Saturday, 3 December 2016
Multiple Filters in a Spark DataFrame column using Scala
To filter a single DataFrame column with multiple values
Filter using Spark.Sql
DataFrame.registerTempTable("tempDfTable")
SqlContext.Sql("""Select * from tempDfTable where tempDfTable.column=1 and tempDfTable.column!=0 """)
Filter a DataFrame column directly
DataFrame.filter(col("column1").equalTo(1) && col("column1").equalTo(not(0)))
Filter using $
Before using $ symbol import namespace - import sql.implicits_
DataFrame.filter($("column1" == 1))
Friday, 2 December 2016
Filter Spark Dataframe column using Scala
If you are using a Spark dataframe, you can filter Spark DataFrame using Scala with Spark.Sql in an easy way like below:
Filter a DataFrame which contains ""
DataFrame.registerTempTable("tempDfTable")
SqlContext.Sql("""Select * from tempDfTable where tempDfTable.col!="" """)
Filter a DataFrame column which contains null
DataFrame.registerTempTable("tempDfTable")
SqlContext.Sql("""Select * from tempDfTable where tempDfTable.col is null """)
You can write this statement with Single Quotes also
SqlContext.Sql("Select * from tempDfTable where tempDfTable.col is null")
Filter a DataFrame column which will not contain null values
DataFrame.registerTempTable("tempDfTable")
SqlContext.Sql("""Select * from tempDfTable where tempDfTable.col is not null """)
Filter a DataFrame which contains ""
DataFrame.registerTempTable("tempDfTable")
SqlContext.Sql("""Select * from tempDfTable where tempDfTable.col!="" """)
Filter a DataFrame column which contains null
DataFrame.registerTempTable("tempDfTable")
SqlContext.Sql("""Select * from tempDfTable where tempDfTable.col is null """)
You can write this statement with Single Quotes also
SqlContext.Sql("Select * from tempDfTable where tempDfTable.col is null")
Filter a DataFrame column which will not contain null values
DataFrame.registerTempTable("tempDfTable")
SqlContext.Sql("""Select * from tempDfTable where tempDfTable.col is not null """)
Saturday, 5 November 2016
Tuesday, 18 October 2016
GoDaddy Mail Pop3 IMAP SMTP Mail Server Port Settings C# | Java | Php
GoDaddy Mail POP3 IMAP incoming and SMTP outgoing mail server settings port number list :
Below are the POP3 IMAP SMTP Mail Servers for GoDaddy :
GoDaddy POP3 incoming mail server: pop.secureserver.net
GoDaddy IMAP incoming mail server: imap.secureserver.net (port 143 or 993)
GoDaddy SMTP outgoing mail server: smtpout.secureserver.net
Below are the POP3 IMAP SMTP Mail Servers for GoDaddy :
GoDaddy POP3 incoming mail server: pop.secureserver.net
GoDaddy IMAP incoming mail server: imap.secureserver.net (port 143 or 993)
GoDaddy SMTP outgoing mail server: smtpout.secureserver.net
Yahoo Mail Pop3 IMAP SMTP Mail Server Port Settings C# | Java | Php
Yahoo Mail POP3 IMAP incoming and SMTP outgoing mail server settings port number list :
Below are the POP3 IMAP SMTP Mail Servers for Yahoo Mail:
Yahoo Mail POP3 incoming mail server: pop.mail.yahoo.com (port 995)
Yahoo MailI MAP incoming mail server: imap.mail.yahoo.com (port 993)
Yahoo Mail SMTP outgoing mail server: smtp.mail.yahoo.com (port 587)
Below are the POP3 IMAP SMTP Mail Servers for Yahoo Mail:
Yahoo Mail POP3 incoming mail server: pop.mail.yahoo.com (port 995)
Yahoo MailI MAP incoming mail server: imap.mail.yahoo.com (port 993)
Yahoo Mail SMTP outgoing mail server: smtp.mail.yahoo.com (port 587)
Gmail Pop3 IMAP SMTP Mail Server Port Settings C# | Java | Php
Gmail POP3 IMAP incoming and SMTP outgoing mail server settings port number list :
Below are the POP3 IMAP SMTP Mail Servers for GMail:
GMail POP3 incoming mail server: pop.gmail.com (port 995)
GMail IMAP incoming mail server: imap.gmail.com (port 993)
GMail SMTP outgoing mail server: smtp.gmail.com (port 587)
Below are the POP3 IMAP SMTP Mail Servers for GMail:
GMail POP3 incoming mail server: pop.gmail.com (port 995)
GMail IMAP incoming mail server: imap.gmail.com (port 993)
GMail SMTP outgoing mail server: smtp.gmail.com (port 587)
Monday, 10 October 2016
List of Online Code Beautifier Sites for Html,Css,Php,Javascript,jquery
To beautify you html, css code line by line use this site:
https://ctrlq.org/beautifier/
To beautify javascript code line by line use this site:
Jsbeautifier.org
https://ctrlq.org/beautifier/
To beautify javascript code line by line use this site:
Jsbeautifier.org
Subscribe to:
Comments
(
Atom
)


