Posts: 29
Registered: ‎01-20-2017
Accepted Solution

Oozie script for sqoop not valid

Hi ,

   I am trying to execute the oozie script to execute Sqoop command.

I am getting error as

Error: E0701 : E0701: XML schema error, cvc-complex-type.2.4.a: Invalid content was found starting with element 'job-traker'. One of '{"uri:oozie:sqoop-action:0.2":job-tracker}' is expected


Here is my code.


<?xml version="1.0" encoding="UTF-8"?>
<workflow-app name="sample-wf" xmlns="uri:oozie:workflow:0.1">
<start to="myfirstsqoopjob"/>
    <action name="myfirstsqoopjob">
        <sqoop xmlns="uri:oozie:sqoop-action:0.2">
                <delete path="${nameNode}/user/cloudera/data/emp_sal"/>
           <command>sqoop import --connect jdbc:mysql://localhost/test --table emp_sal --username root --password cloudera --target-dir /user/cloudera/data/emp_sal --delete-target-dir -m 1 --fields-terminated-by ',' 
        <ok to="end"/>
        <error to="fail"/>
<kill name="fail">
	<message>Sqoop action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
<end name="end"/>

what is error here with job tracker line.


Posts: 29
Registered: ‎01-20-2017

Re: Oozie script for sqoop not valid

I could solve it. Dont know what error but is working fine.

Cloudera Employee
Posts: 24
Registered: ‎06-17-2016

Re: Oozie script for sqoop not valid

"sqoop" causes errors in the <command> tag. 

See OOZIE-2816 for some detail