HIve sql multiple conditions in where cluase

0 votes
Hi,

My table has created_date, changed_date in datetime format. all I need is pull records from last one hour. so the logic needs to be if created_date or changed_date matches current_date then I want to do something like hour(to_date(created_date)-1) and if changed_date matches current_date.

Thanks in advance
Feb 12 in Big Data Hadoop by syam
• 120 points

edited Feb 12 by Gitika 129 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

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,060 points
179 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
• 29,170 points
66 views
0 votes
1 answer

Where is table data stored in Apache HIve by default?

Hi, yes, you can do it by using  ...READ MORE

answered Jun 18, 2019 in Big Data Hadoop by Gitika
• 29,170 points
116 views
0 votes
1 answer

What is "java.sql.SQLException: org.apache.thrift.transport.TTransportException" in Hive?

This particular exception is related to Hive logs. ...READ MORE

answered Jul 30, 2019 in Big Data Hadoop by ravikiran
• 4,600 points
1,244 views
0 votes
1 answer

How Impala is fast compared to Hive in terms of query response?

Impala provides faster response as it uses MPP(massively ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by nitinrawat895
• 10,920 points
561 views
0 votes
1 answer

How to duplicate IDs with Hive QL / Impala / Python

Based on your example, supposing id2 always ...READ MORE

answered Oct 1, 2018 in Python by Priyaj
• 57,530 points
89 views
0 votes
1 answer

HIVE DATA LOADING ERROR

Dear Raghu, Hope you are doing great. It is ...READ MORE

answered Dec 17, 2017 in Data Analytics by Sudhir
• 1,610 points
384 views
+1 vote
2 answers

Execute Pig Script from Grunt Shell

From your current directory run  pig -x local Then ...READ MORE

answered Oct 25, 2018 in Big Data Hadoop by Kunal
1,543 views
0 votes
3 answers

What is Hive? Is Hive a database?

Hive is a data Warehouse infrastructure/system built ...READ MORE

answered Jul 1, 2019 in Big Data Hadoop by Ved Gupta
11,505 views