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 -oozie http://localhost:11000/oozie
Check the status of the job in the Oozie web console. The job should finish successfully.
In the next section, we will see the Hive action of Oozie.