1

I want to run file_1.hql and file_2.hql in one hive session. How can I do that? I was thinking of passing both files as hive -f file_1.hql file_2.hql. But -f only takes one file. Any suggestion?

Sano babu
  • 105
  • 1
  • 6
  • Use `source` hive command: https://stackoverflow.com/a/46847977/2700344 You can include many `source` commands in your script – leftjoin Feb 14 '18 at 21:43

1 Answers1

3

What about using bash:

hive -e "$(cat file1.hql file2.hql)"
parisni
  • 920
  • 7
  • 20