Running a Hive job from the command line
We can submit the Oozie Hive job from the command line. To see the Oozie help menu, we need to pass the arguments shown in the following screenshot:
The code for this section of chapter is present in the hive_commandline
file placed at <BOOK_CODE_HOME>/learn_oozie/ch06/
.
The Hive script used is pretty simple. It is just loading data into the Hive table using the LOAD
command as follows:
LOAD DATA INPATH '/user/hue/learn_oozie/ch06/hive_commandline/input' INTO TABLE CH06_RAINFALL_TREND;
To run the job, we can use the following command:
oozie hive -config job.properties -file Insert.hql ...
Get Apache Oozie Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.