Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run hive script from hive cli

I have hive script custsales.hql now I want to run it from hive cli as

hive (pract5)> run /user/training/hdfs_location/custsales.hql

but it does not execute. Please guide. I know we can run it from command line with

$ hive -f /home/training/local_location/custsales.hql

but this is not my requirement.

like image 324
user8167344 Avatar asked Oct 18 '17 13:10

user8167344


1 Answers

Use source path/to/script command.

like image 64
leftjoin Avatar answered Nov 15 '22 10:11

leftjoin