Question: how to run hql from shell script?
Answer: Yes, we can !!
just like in sql, we can do that in two ways.
Executing a file can be done through the command.
hive -f scriptfile.hql.
save all the scripts you have to run in a “.hql” file and run that command from terminal using hive -f <filename>
executing the script directly.
hive -e "select * from mytable"