首先先写一个shell脚本:
hql="
"
hive -e "$hql" >> 文件名
如果要输出表头:
再加入config
config="
set hive.cli.print.header=true;
"
hql="
$config
"
hive -e "$hql" >> 文件名
首先先写一个shell脚本:
hql="
"
hive -e "$hql" >> 文件名
如果要输出表头:
再加入config
config="
set hive.cli.print.header=true;
"
hql="
$config
"
hive -e "$hql" >> 文件名