Hi,


How do I get the current date in Hive? Specifically, I’m
looking for the equivalent of following SQL where clause:

 

where LOCAL_DT >= current date - 3 day

 

I tried using

 

where local_dt >= date_sub(to_date(unix_timestamp()), 3)

 

but this method seems to be many times slower than hardcoding the date. 
local_dt is the local date and also the partition key for the table.



                                          

Reply via email to