Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Oozie script for sqoop not valid

avatar
Explorer

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">
            <job-traker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
            <prepare>
                <delete path="${nameNode}/user/cloudera/data/emp_sal"/>
            </prepare>
            <configuration>
                <property>
                    <name>mapred.compress.map.output</name>
                    <value>true</value>
                </property>
            </configuration>
           <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 ',' 
           </command>
        </sqoop>
        <ok to="end"/>
        <error to="fail"/>
    </action>
<kill name="fail">
	<message>Sqoop action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>

what is error here with job tracker line.

 

1 ACCEPTED SOLUTION

avatar
Rising Star

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

See OOZIE-2816 for some detail

View solution in original post

2 REPLIES 2

avatar
Explorer

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

avatar
Rising Star

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

See OOZIE-2816 for some detail