我正在尝试将SQLServer表直接导入hbase,下面是sqoop导入语法
sqoop import --connect "jdbc:sqlserver://server_IP:port;databaseName=xxx" --username xxx --password xxx --table sqoop_HBase--hbase-table employeeHBase --column-family amitesh --hbase-row-key empid --hbase-create-table -m 1
在这里,我面临两个问题
1) 如果我要jdbc:sqlserver://服务器\ ip:端口;databasename=在双引号中,我得到下面的错误
5 06:02:05 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6_IBM_27
17/06/05 06:02:05 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
17/06/05 06:02:05 ERROR tool.BaseSqoopTool: Error parsing arguments for import:
17/06/05 06:02:05 ERROR tool.BaseSqoopTool: Unrecognized argument: employeeHBase
17/06/05 06:02:05 ERROR tool.BaseSqoopTool: Unrecognized argument: --column-family
17/06/05 06:02:05 ERROR tool.BaseSqoopTool: Unrecognized argument: amitesh
17/06/05 06:02:05 ERROR tool.BaseSqoopTool: Unrecognized argument: --hbase-row-key
17/06/05 06:02:05 ERROR tool.BaseSqoopTool: Unrecognized argument: empid
17/06/05 06:02:05 ERROR tool.BaseSqoopTool: Unrecognized argument: --hbase-create-table
17/06/05 06:02:05 ERROR tool.BaseSqoopTool: Unrecognized argument: -m
17/06/05 06:02:05 ERROR tool.BaseSqoopTool: Unrecognized argument: 1
2) 当我撤消双引号并执行命令时,我得到下面的错误
--table or --query is required for import. (Or use sqoop import-all-tables.)
Try --help for usage instructions.
-bash: --username: command not found
我很确定我输入了错误的命令语法。可能是我错了。
1条答案
按热度按时间5f0d552i1#
中间一定有空隙
--table sqoop_HBase
以及--hbase-table employeeHBase