我正试图将一些数据导入配置单元表,但我的sqoop作业失败了
sqoop import -libjars '/var/lib/sqoop/DB2JccConfiguration.properties'
--connect 'jdbc:db2://localhost/test;' --username 'name'
--password-file 'pword' --num-mappers 16
--query "SELECT P_NUMBER,AG, EFFECTIVE_DATE, EXPIRATION_DATE, ST, ZIP FROM wU99.snapshot WHERE ZIP = 15392 AND \$CONDITIONS"
--split-by 'AG'--hive-import --hive-table ag.test
--target_dir '/user/name/Test'
Warning: /opt/cloudera/parcels/CDH-5.8.3-1.cdh5.8.3.p2036.2124/bin/../lib/sqoop/../accumulo does not exist!
Accumulo imports will fail.Please set $ACCUMULO_HOME to the root of your Accumulo installation.
17/05/03 16:21:10 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.8.3
17/05/03 16:21:12 ERROR tool.BaseSqoopTool: Error parsing arguments for import:
17/05/03 16:21:12 ERROR tool.BaseSqoopTool: Unrecognized argument: AG--hive-import
17/05/03 16:21:12 ERROR tool.BaseSqoopTool: Unrecognized argument: --hive-table
17/05/03 16:21:12 ERROR tool.BaseSqoopTool: Unrecognized argument: ag.test
17/05/03 16:21:12 ERROR tool.BaseSqoopTool: Unrecognized argument: --target_dir
17/05/03 16:21:12 ERROR tool.BaseSqoopTool: Unrecognized argument: /user/name/Test
我不知道为什么它在读表格的时候失败了。任何帮助都将不胜感激。
2条答案
按热度按时间kx1ctssn1#
sqoop import -libjars '/var/lib/sqoop/DB2JccConfiguration.properties' --connect 'jdbc:db2://localhost/test;' --username 'name' --password-file 'pword' --num-mappers 16 --query "SELECT P_NUMBER,AG, EFFECTIVE_DATE, EXPIRATION_DATE, ST, ZIP FROM wU99.snapshot WHERE ZIP = 15392 AND \$CONDITIONS" --split-by 'AG' --hive-database 'your_database_name' --hive-import --target-dir '/user/name/Test'
hrirmatl2#
中间应该有空隙
'AG'
以及--hive-import
应该是的--target-dir
而不是--target_dir