How to use scriptVariables in hive (AWS Data Pipeline)

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

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

How do we access these variables in a bush script? I am 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 the hive is limited. Any help with this would be greatly appreciated. Thank.

+4
source share
1 answer

just write $ {param1}.

, -d.

hive -d param1 = 2014-06-20

select * from something where dt='${param1}';
+4

Source: https://habr.com/ru/post/1538909/


All Articles