Hive - 传参hiveconf,hivevar

--hiveconf配置

--hivevar参数

--hive配置
hive -e "select * from tablename" --hiveconf mapreduce.job.queuename=yarn_queuename
|
hive --hiveconf mapreduce.job.queuename=yarn_queuename -e "select * from tablename"
hive -e "select * from tablename where biz_date='${biz_date}'" --hivevar biz_date=${biz_date}
或
hive -e "select * from tablename where biz_date='${hivevar:biz_date}'" --hivevar biz_date=${biz_date}

猜你喜欢

转载自blog.csdn.net/qq_24256877/article/details/121310274