Member since
10-31-2017
1
Post
0
Kudos Received
0
Solutions
11-01-2017
08:51 PM
This will not work. set hivevar:tab_dt= substr(date_sub(current_date,1),1,10); Only sets variable hivevar:tab_dt to be string "substr(date_sub(current_date,1),1,10)", not the value as the result of evaluation of the function call. You will need get the date string outside of Hive and then pass in as the variable. So below will work: set hivevar:tab_dt=2017_10_01; create table test_${hivevar:tab_dt} (a int);
... View more