如何通过Hive脚本传递Env变量?
我有一个带有test.hql的HQL脚本 因为我在查询日期中有这样的env变量 我该如何将论点传递给HQL 如果是hiveconf或hivevar,我们
hive -f --hiveconf date='20220526' test.hql
会像某些人一样
hive -f --env date='20220526' test.hql
运行脚本
I have a hql script with test.hql
in that i'm having env variable like this in query date='${env:date}'
how can i pass an argument to the hql
if it is hiveconf or hivevar we run script like
hive -f --hiveconf date='20220526' test.hql
can some one tell how will we pass env variable
hive -f --env date='20220526' test.hql
i'm not able to pass like above
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
环境变量将由外壳解释,而不是查询。
另外,应使用
Beeline
而不是弃用的Hive CLIEnvironment variables would be interpreted by the shell, not a query.
Also,
beeline
should be used rather than deprecated Hive cli