Error while using Spark SQL filter API

0 votes

I have tried filtering the Specified row info of Dataframe using Filter command. What my issue is that when I tried with "> 1" it works fine, but when comes with "==1" it is throwing me an error message.

Feb 4 in Apache Spark by Kriti
33 views

1 answer to this question.

0 votes

You have to use "===" instead of "==" and it should work fine. Have a look at the syntax attached below for your reference.

df.filter(df("state")==="TX").show()
answered Feb 4 by Omkar
• 67,660 points

Related Questions In Apache Spark

0 votes
1 answer
0 votes
1 answer

Which query to use for better performance, join in SQL or using Dataset API?

DataFrames and SparkSQL performed almost about the ...READ MORE

answered Apr 19, 2018 in Apache Spark by kurt_cobain
• 9,260 points
131 views
0 votes
1 answer

What's the difference between 'filter' and 'where' in Spark SQL?

Both 'filter' and 'where' in Spark SQL ...READ MORE

answered May 23, 2018 in Apache Spark by nitinrawat895
• 10,710 points
7,513 views
0 votes
1 answer

Getting error while connecting zookeeper in Kafka - Spark Streaming integration

I guess you need provide this kafka.bootstrap.servers ...READ MORE

answered May 24, 2018 in Apache Spark by Shubham
• 13,300 points
693 views
0 votes
1 answer
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,710 points
3,329 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,710 points
399 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
16,457 views
0 votes
1 answer

Error reading avro dataset in spark

For avro, you need to download and ...READ MORE

answered Feb 4 in Apache Spark by Omkar
• 67,660 points
344 views
0 votes
1 answer

Error using double map.

You have forgotten to mention the case ...READ MORE

answered Feb 11 in Apache Spark by Omkar
• 67,660 points
31 views