将数据从oracle导入hdfs时出错

ih99xse1  于 2021-06-03  发布在  Sqoop
关注(0)|答案(1)|浏览(498)

我已尝试此命令,但出现以下错误。。
命令:

sqoop import --connect jdbc:oracle:thin:@ip:1521:XE --username akash -P --table transactions_Oracle --coloumns "Tid,AccounID,Amount" --hive-import   --hive table akash.Transactions_Oracle -m1

错误:

16/07/13 00:13:38 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.7.0
Enter password: 
16/07/13 00:13:41 ERROR tool.BaseSqoopTool: Error parsing arguments for import:
16/07/13 00:13:41 ERROR tool.BaseSqoopTool: Unrecognized argument: --coloumns
16/07/13 00:13:41 ERROR tool.BaseSqoopTool: Unrecognized argument: Tid,AccounID,Amount
16/07/13 00:13:41 ERROR tool.BaseSqoopTool: Unrecognized argument: --hive-import
16/07/13 00:13:41 ERROR tool.BaseSqoopTool: Unrecognized argument: --hive
16/07/13 00:13:41 ERROR tool.BaseSqoopTool: Unrecognized argument: table
16/07/13 00:13:41 ERROR tool.BaseSqoopTool: Unrecognized argument: akash.Transactions_Oracle
16/07/13 00:13:41 ERROR tool.BaseSqoopTool: Unrecognized argument: -m1

list database命令工作正常,但无法从表中导入数据。。

mi7gmzs6

mi7gmzs61#

正确的语法是: sqoop import --connect jdbc:oracle:thin:@ip:1521:XE --username akash -P --table transactions_Oracle --columns "Tid,AccounID,Amount" --hive-import --hive-table akash.Transactions_Oracle -m 1 你写的 coloumns 而不是 columns , --hive table 而不是 --hive-table 以及 m1 而不是 m 1 检查drill docs以了解import命令中各种标记的含义。

相关问题