OUTPUT="$(hive -e 'use oxi_consolidated; show tables;')"
hive -e "select count(*) from ${OUTPUT}" > countoxi.txt
Execute all .hql files inside a directory:
oxi_array=(`find /home/oxigen/HiveStartup/ -type f -follow` )
for element in "${oxi_array[@]}"
do
hive -f "${element}"
done
hive -e "select count(*) from ${OUTPUT}" > countoxi.txt
Execute all .hql files inside a directory:
oxi_array=(`find /home/oxigen/HiveStartup/ -type f -follow` )
for element in "${oxi_array[@]}"
do
hive -f "${element}"
done
No comments:
Post a Comment