小编the*_*f91的帖子

需要使用Hive将Shell Action中的变量传递给Oozie Shell

所有,

希望将变量从shell动作传递给oozie shell.我在我的脚本中运行这样的命令:

#!/bin/sh
evalDate="hive -e 'set hive.execution.engine=mr; select     max(cast(create_date as int)) from db.table;'"
evalPartition=$(eval $evalBaais)
echo "evaldate=$evalPartition"
Run Code Online (Sandbox Code Playgroud)

诀窍是它是shell中的hive命令.

然后我运行它来获取它在oozie中:

${wf:actionData('getPartitions')['evaldate']}
Run Code Online (Sandbox Code Playgroud)

但它每次都是空白!我可以在我的shell中运行这些命令很好,它似乎工作,但oozie没有.同样,如果我在群集的其他框上运行命令,它们也可以正常运行.有任何想法吗?

shell hive oozie

5
推荐指数
1
解决办法
2136
查看次数

标签 统计

hive ×1

oozie ×1

shell ×1