You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Preya Shah <pr...@gmail.com> on 2014/10/02 23:09:50 UTC
Oozie workflow for Sqoop Incremental update
Hi I am trying to get updated or newly added data from relational database
using Sqoop. Sqoop command is working fine but when I try to execute it
through the oozie workflow it does not work.
It is giving me below error:
Main class [org.apache.oozie.action.hadoop.SqoopMain], exit code [1]
*workflow.xml file*
<workflow-app xmlns="uri:oozie:workflow:0.2" name="ooziedemo-wf">
<start to="sqoopIncrImport"/>
<!-- Sqoop Action for Incremental Import -->
<action name="sqoopIncrImport">
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<prepare>
<delete path="${nameNode}/user/abc/incr/TEST"/>
</prepare>
<arg>import</arg>
<arg>--connect</arg>
<arg>${dbURL}</arg>
<arg>--driver</arg>
<arg>${myOracleDriver}</arg>
<arg>--username</arg>
<arg>${user}</arg>
<arg>--password</arg>
<arg>apps</arg>
<arg>--table</arg>
<arg>TEST</arg>
<arg>--warehouse-dir</arg>
<arg>${nameNode}/user/abc/incr/</arg>
<arg>--m</arg>
<arg>1</arg>
</sqoop>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Workflow failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
Can anyone please help me resolving this issue?
Thanks in advance.