0

while trying to set current timestamp in hive and use it later. Gets the following error

hive> set start_time= unix_timestamp();
FAILED: Parse Error: line 1:0 cannot recognize input near 'unix_timestamp' '(' ')' 

Am i doing something wrong or is there any other way to capture current timestamp in hive?

Ranadheer
  • 75
  • 1
  • 5

1 Answers1

0

You have to use a table if you want to use unix_timestamp, in concrete terms:

select unix_timestamp() from any_existing_table LIMIT 1; 

You can find more explanations here : Get current unix_timestamp in Hive

Community
  • 1
  • 1
Mickael Lecoq
  • 211
  • 3
  • 10