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
21 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,140 points

Related Questions In Apache Spark

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,240 points
83 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,150 points
4,197 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,190 points
450 views
0 votes
1 answer

How to get SQL configuration in Spark using Python?

You can get the configuration details through ...READ MORE

answered Mar 18 in Apache Spark by John
34 views
0 votes
0 answers
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,150 points
2,059 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,150 points
198 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
10,546 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,140 points
162 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,140 points
21 views