5

We can pass script variables into AWS data pipeline hiveactivity using the following construct :

"scriptVariable" : [
    "param1=value1",
    "param2=value2"
  ]

How do we access these variables in the hive script? I have been trying to use them in a select statement without any success :

Select ${hiveconf:param1}, dummytable.col1,...
from dummytable where dummytable.id = 1;

My knowledge of hive is limited. Any help with this will be greatly appreciated. Thanks.

4

1 回答 1

5

只需写 ${param1}。

您可以通过使用 -d 启动 hive 来测试它。

蜂巢-d param1=2014-06-20

select * from something where dt='${param1}';
于 2014-06-20T06:44:17.620 回答