s****h 发帖数: 3979 | 1 【 以下文字转载自 DataSciences 讨论区 】
发信人: squash (南瓜之夭夭), 信区: DataSciences
标 题: question about using Hive parameter
发信站: BBS 未名空间站 (Fri Oct 17 15:20:07 2014, 美东)
question about Hive parameter
Support we have some parameters as:
set nyear = '2014';
set nmonth = '10';
set nday = '17';
We generate a new parameter as:
set newdatestring = concat('/foldername/', ${hiveconf:nyear}, '/', ${
hiveconf:nmonth}, '/', ${hiveconf:nday},'/');
Comparing 2 queries
q1:
select ${hiveconf:newdatestring};
q1 output:
/foldername/2014/10/17/
q2:
select "${hiveconf:newdatestring}";
q2 output:
concat('/foldername/', '2014', '/', '10', '/', '17','/')
The question: is there any setting so that the output of the query 2 is also
'2014/10/17/'?
Why I ask this question?
The real query we want to run is similar to:
create external table tableone( ... ) LOCATION ${hiveconf:newdatestring};
I think the ${hiveconf:newdatestring} in this query is the output of q2
instead of q1.
Thanks for your help. |
|