How to execute HQL commands using .hql files

Viewed 24840

I am new to Hive and wanted to know how to execute hive commoands directly from .hql file.

3 Answers

hive -f filepath; example-hive -f /home/Nitin/Desktop/Hive/script1.hql;

Use hive -f filename.hql;

Remember to terminate your command with ;

Related