导入查询时Cloudera Oozie Sqoop导入错误

问题描述

我在cloudera的oozie工作流程中遇到错误。但是它在linux shell中工作正常。我有

sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" --connect jdbc:oracle:thin:@XXXX.XX.XX.XXX/TEST --username XXX --password XXX --split-by ORDERID --query "SELECT ORDERID,TRANS_STATUS,TRANS_INITATE_TIME FROM cpstxn.trans_record  WHERE TRANS_INITATE_TIME>=TO_DATE('2020-01-01','YYYY-MM-DD') AND \$CONDITIONS" --delete-target-dir --target-dir /tmp/test/sqoop --as-avrodatafile -m 5

错误日志

16:55:24.377 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Error parsing arguments for import:
16:55:24.377 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: ORDERID,TRANS_INITATE_TIME
16:55:24.377 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: FROM
16:55:24.377 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: cpstxn.cps_trans_record
16:55:24.377 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: WHERE
16:55:24.377 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: trunc(TRANS_INITATE_TIME)>=TO_DATE('2020_02_01','YYYY-MM-DD')
16:55:24.377 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: AND
16:55:24.377 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: \$CONDITIONS"
16:55:24.377 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: --delete-target-dir
16:55:24.378 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: --target-dir
16:55:24.378 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: /tmp/test
16:55:24.378 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: -m
16:55:24.378 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: 5
16:55:24.378 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool - Unrecognized argument: --as-avrodatafile

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)