How can we use IN EXIST operator in Hive

0 votes
Can anyone explain how we can use IN/EXIST operator in Hive?
Jun 19, 2019 in Big Data Hadoop by Sanju
8,073 views

1 answer to this question.

0 votes

Hey,

Yes, now Hive supports IN or EXIST, operators. Also, you can use left semi join here. Left Semi Join performs the same operation IN do in SQL.

So if you have the below query in SQL-

SELECT a.key, a.value
FROM a
WHERE a.key in
(SELECT b.key
FROM B);

Then the suitable query for the same in Hive can be-

SELECT a.key, a.val
FROM a LEFT SEMI JOIN b on (a.key = b.key)

Both will fulfill the same purpose.

answered Jun 19, 2019 by Gitika
• 65,910 points

Related Questions In Big Data Hadoop

–1 vote
1 answer

How we can run spark SQL over hive tables in our cluster?

Open spark-shell. scala> import org.apache.spark.sql.hive._ scala> val hc = ...READ MORE

answered Dec 26, 2018 in Big Data Hadoop by Omkar
• 69,210 points
1,137 views
0 votes
1 answer

How can we configure remote metastore mode in Hive?

Hey,  Basically, hive-site.xml file has to be configured ...READ MORE

answered Jun 19, 2019 in Big Data Hadoop by Gitika
• 65,910 points
1,180 views
0 votes
1 answer
0 votes
1 answer

How can I use my host machine’s web browser to check my HDFS services running in the VM?

The sole purpose of the virtual machine ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by Shubham
• 13,490 points
1,100 views
+1 vote
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
• 11,380 points
10,618 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
• 11,380 points
2,215 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
104,943 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
4,296 views
+1 vote
1 answer

Can we use LIKE operator in Hive?

Hey, Yes, Hive supports LIKE operator, but it ...READ MORE

answered Jun 19, 2019 in Big Data Hadoop by Gitika
• 65,910 points
18,613 views
0 votes
1 answer

How can we access data with simple SQL knowledge in hive?

Hey, The following examples are simple, common data ...READ MORE

answered May 16, 2019 in Big Data Hadoop by Gitika
• 65,910 points
463 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP