Sqoop导入查询不适用于OOZIE sqoop操作

时间:2019-04-15 08:10:10

标签: sqoop oozie hue

我正在尝试从mysql导入数据到蜂巢。表中的列名称有空格。 Sqoop导入查询正在终端上运行,但是当我在Hue Oozie工作流sqoop操作中使用相同的查询时,出现错误。

> desc person;
+-------------+--------------+------+-----+---------+-------+
| Field       | Type         | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| person id   | int(11)      | YES  |     | NULL    |       |
| person name | varchar(255) | YES  |     | NULL    |       |
+-------------+--------------+------+-----+---------+-------+

请注意上面两栏中的空格。

在终端上运行的Sqoop导入查询

> sqoop import --connect jdbc:mysql://localhost/prateek_temp --username root --password cloudera --query "select p.\`person id\` from person p where p.\`person id\` = 1 and \$CONDITIONS" --hive-import -split-by "p.\`person id\`" --hive-database prateek_tmp --hive-table person --target-dir /user/cloudera/person_tmp -m 1

当我在使用HUE的oozie sqoop动作中使用以上查询时,出现以下错误。

2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: person
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: p
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: where
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: p.\`person
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: id\`
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: =
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: 1
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: and
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: \$CONDITIONS"
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: --hive-import
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: -split-by
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: "p.\`person
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: id\`"
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: --hive-database
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: prateek_tmp
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: --hive-table
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: person_1
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: --target-dir
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: /user/cloudera/person_tmp
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: -m
2019-04-14 21:09:40,615 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: 1

0 个答案:

没有答案