title: oozie running Sqoop command in a shell script
body: <p>can I write a sqoop import command in a script and  excute it in oozie as coordinator workflow?</p>
  
  <p>I have tired to do so and found an error saying sqoop command not found even  if i give the absolute path for sqoop to execute</p>
  
  <p>script.sh is as follows</p>
  
  <p><code>sqoop import --connect 'jdbc:sqlserver://xx.xx.xx.xx'  -username=sa -password -table materials  --fields-terminated-by '^' -- --schema dbo -target-dir /user/hadoop/CFFC/oozie_materials</code></p>
  
  <p>and I have placed the file in HDFS and gave oozie its path.The workflow is as follows :</p>
  
  <pre><code>&lt;workflow-app xmlns='uri:oozie:workflow:0.3' name='shell-wf'&gt;
  &lt;start to='shell1' /&gt;
  &lt;action name='shell1'&gt;
      &lt;shell xmlns="uri:oozie:shell-action:0.1"&gt;
          &lt;job-tracker&gt;${jobTracker}&lt;/job-tracker&gt;
          &lt;name-node&gt;${nameNode}&lt;/name-node&gt;
          &lt;configuration&gt;
              &lt;property&gt;
                &lt;name&gt;mapred.job.queue.name&lt;/name&gt;
                &lt;value&gt;${queueName}&lt;/value&gt;
              &lt;/property&gt;
          &lt;/configuration&gt;
          &lt;exec&gt;script.sh&lt;/exec&gt;
          &lt;file&gt;script.sh#script.sh&lt;/file&gt;
      &lt;/shell&gt;
      &lt;ok to="end" /&gt;
      &lt;error to="fail" /&gt;
  &lt;/action&gt;
  &lt;kill name="fail"&gt;
      &lt;message&gt;Script failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&lt;/message&gt;
  &lt;/kill&gt;
  &lt;end name='end' /&gt;
  </code></pre>
  
  <p></p>
  
  <p>the oozie returns an error as sqoop command not found in the mapreduce log.</p>
  
  <p>so is that a good practice?</p>
  
  <p>Thanks  </p>