hdp-2.5.0.0使用ambari 2.4.0.1
我可以从sql server源数据库在hcatalog中创建一个表,例如:
sqoop import --null-string '\\N' --null-non-string '\\N' --hive-delims-replacement '\0D' --hcatalog-home /usr/hdp/current/hive-webhcat --hcatalog-database MS_Management_Coaching --hcatalog-table TripAggregate --create-hcatalog-table --hcatalog-storage-stanza 'stored as orc tblproperties ("orc.compress"="ZLIB")' --validate --connect 'jdbc:sqlserver://<DB server>;database=Management' --username uname--password pwd--table TripAggregate -- --schema Coaching
但是,当我尝试使用--create hive表时--schema选项不起作用,无论我将其放置在何处:
-bash-4.2$ sqoop create-hive-table --hive-database test --connect 'jdbc:sqlserver://<DB Server>;database=Management' --username uname--password pwd--table TripAggregate -- --schema Coaching
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
16/10/12 21:28:13 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.5.0.0-1245
16/10/12 21:28:13 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
16/10/12 21:28:13 ERROR tool.BaseSqoopTool: Error parsing arguments for create-hive-table:
16/10/12 21:28:13 ERROR tool.BaseSqoopTool: Unrecognized argument: --
16/10/12 21:28:13 ERROR tool.BaseSqoopTool: Unrecognized argument: --schema
16/10/12 21:28:13 ERROR tool.BaseSqoopTool: Unrecognized argument: DriverCoaching
Try --help for usage instructions.
1条答案
按热度按时间qpgpyjmq1#
如果争论
--
在命令行上给定,然后将后续参数直接发送到基础工具。在研究了sqoop代码之后,我在
--create-hive-table
流不会流向基础工具。所以你不能使用-- --schema
听你指挥。源代码的有用部分
ImportTool
:源代码的有用部分
CreateHiveTable
:你看不到检查
--
args在后面完成。编辑:
--hive-import
默认情况下,创建配置单元表,您可以使用-- --schema
使用import命令。如果希望sqoop为您创建配置单元表并导入该表中的数据。它应该对你有用。