aws emr cli-向配置单元传递参数

vmjh9lq9  于 2021-06-04  发布在  Hadoop
关注(0)|答案(1)|浏览(291)

我正在使用aws的emr ruby cli生成hadoop群集,并尝试在其他地方托管的配置单元脚本中包含要使用的参数,例如:

./elastic-mapreduce --create ... --args -d,DT=2013-01-26

“dt”在hadoopjarstep.args数组中的显示令人满意,因此我尝试将其包含在配置单元脚本中,如下所示:

...

tblproperties(
  'dynamodb.table.name' = ${DT},
  ...

但我很快就明白了:

Parse Error: line 8:28 mismatched input '$' expecting StringLiteral near '=' in specifying key/value property

如何在配置单元脚本中正确地包含参数?

xxslljrj

xxslljrj1#

我不太清楚为什么你目前的方法不起作用,但我在以下方面取得了成功:

./elastic-mapreduce --create ... --args "-hiveconf,DT=2013-01-26"

在Hive脚本中:

tblproperties(
    "dynamodb.table.name" = "${hiveconf:DT}",
    ...
)

希望这有帮助。

相关问题