Created on 09-16-2015 06:43 PM - edited 09-16-2022 02:41 AM
I've configured an Oozie workflow to run this Sqoop job:
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>my-node:8032</job-tracker>
<name-node>hdfs://my-node:8020</name-node>
<command>import --connect "jdbc:mysql://<url>" --username "dummy" --password "pwd" --query "SELECT col1, col2, CAST(REPLACE(SUBSTR(datecol,1,7), '-', '') AS UNSIGNED) as dateyyymm FROM src_table WHERE \$CONDITIONS" --target-dir /user/hive/warehouse/hive_table --fetch-size 0 --hive-import --hive-drop-import-delims --hive-table hive_table -m1</command>
<file>/tmp/hive-site.xml#hive-site.xml</file>
</sqoop>
The Sqoop command works fine if ran from command prompt, but I keep running into these errors using Oo:
[uber-SubtaskRunner] ERROR org.apache.sqoop.tool.BaseSqoopTool - Error parsing arguments for import:
[uber-SubtaskRunner] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: col1
[uber-SubtaskRunner] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: col2
[uber-SubtaskRunner] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument:
CAST(REPLACE(SUBSTR(datecol,1,7),
[uber-SubtaskRunner] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: '-',
[uber-SubtaskRunner] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: '')
[uber-SubtaskRunner] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: AS
[uber-SubtaskRunner] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: UNSIGNED)
[uber-SubtaskRunner] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: as
[uber-SubtaskRunner] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: dateyyymm
..
...
Created 09-16-2015 07:31 PM
Created 09-16-2015 09:56 PM
Thanks Harsha!
I'm using Oozie editor in Hue 3.6 and do not see any option to add 'args'. I attempted to use 'parameters' but upon submitting got an exception regarding invalid xml.
Please let me know how to add the args.
Created 09-16-2015 10:21 PM
I got the oozie job to run after adding all the args under Parameters. thanks!
Created 09-18-2015 04:23 AM