hadoop - Hive Timestamp aggregation -


i have 2 hive tables, in 1 table updating hourly basic java api team (they calling , storing hive table1). , have aggregate latest data , store table called table2 (data loaded newly,because old data have been aggregated , stored). have used query below:

set maxtime = select max(lastactivitytimestamp) table2; insert table2 select * table1 lastactivitytimestamp > unix_timestamp('${hivevar:maxtime}'); 

i not getting result. when give timestamp value manually getting data, below:

insert table2 select * table1 lastactivitytimestamp > unix_timestamp('2014-08-18 15:23:26.754'); 

is possible pass dynamic values in unix_timestamp?

try removing upper commas unix_timestamp() function, this:

insert table2 select * table1 lastactivitytimestamp > unix_timestamp(${hivevar:maxtime}); 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -