多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
将`max_comp_id`变量接收到的值传递到`hive_script.hql`文件 `vi testhive.sh` ~~~ #!/bin/bash max_comp_id=$(hive -e "set hive.cli.print.header=false; select max(comp_id) from ods_tradecn_trade_company;") hive -hiveconf "max_comp_id"="$max_comp_id" -f ./hive_script.hql ~~~ `vi hive_script.hql` 创建脚本 ~~~ select * from ods_tradecn_trade_company where comp_id='${hiveconf:max_comp_id}'; ~~~