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
29 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,460 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,240 points
107 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,670 points
5,810 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,290 points
556 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,670 points
2,704 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,670 points
284 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
13,451 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,460 points
259 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,460 points
27 views