【问题标题】:Can't pass parameters to hive script无法将参数传递给配置单元脚本
【发布时间】:2015-05-29 10:41:40
【问题描述】:

我有下一个配置单元脚本:

SET LAB_MS_EXT_SCHEME='INTERAL';
set LAB_MS_EXT_SCHEME;
set ${hiveconf:name};

所以我尝试从 bash 调用这个脚本:

hive -hiveconf name=HELLLO -f myScript.hql

结果我得到了下一个输出:

LAB_MS_EXT_SCHEME='INTERAL'
${hiveconf:name} is undefined

如果有人帮我将参数传递给 hive 脚本,我将非常感激。

【问题讨论】:

    标签: hadoop hive bigdata hiveql


    【解决方案1】:

    您需要使用 hiveconf 进行变量替换。请查看这些链接以获取答案。

    How to set variables in HIVE scripts

    Passing parameters in Hive script

    Hive shell inside scripts

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-31
      • 2011-04-07
      • 2020-06-27
      • 2012-03-15
      • 2019-11-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多