Run the os command and enter the value of the hive variable
2 answers
file filename.lst
line
make a file test.sh,
temp=$(cat /home/user/filename.lst)
hive -f test.hql -hiveconf var=$temp
make another test.hql file
create table test(${hiveconf:var} string);
at the terminal
sh -x test.sh
It will pass the string test.hql and create a table with the string as column;
note - all files must be in the same directory. This script only passes one variable.
0
source to share