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
Post a Comment