Your workflow might look something like this ... workflow.xml
<workflow-app xmlns="uri:oozie:workflow:0.2" name="hive-wf"> <start to="hive-node"/> <action name="hive-node"> <hive xmlns="uri:oozie:hive-action:0.2"> <job-tracker>localhost:50001</job-tracker> <name-node>hdfs://localhost:50000</name-node> <configuration> <property> <name>mapred.job.queue.name</name> <value>default</value> </property> <property> <name>oozie.hive.defaults</name> <value>/user/user1/oozie/hive-site.xml</value> </property> </configuration> <script>script.q</script> <param>INPUT_TABLE=SampleTable</param> <param>OUTPUT=/user/user1/output-data/hive</param> </hive> <ok to="end"/> <error to="fail"/> </action> <kill name="fail"> <message>Hive failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message> </kill> <end name="end"/> </workflow-app>
So here hive-site.xml is the xml site present in the $ HIVE_HOME / conf folder.
The script.q file contains the actual bush request. select * from ${INPUT_TABLE}
.
how and where can we use the OUTPUT parameter?
source share