sqoop将所有表导入hive/hcatalog

mf98qq94  于 2021-05-29  发布在  Hadoop
关注(0)|答案(0)|浏览(339)

hdp-2.4.2.0-258使用ambari 2.2.2.0安装
要将单个表从sql server导入到hcatalog,以下命令就足够了:

sqoop import --connect 'jdbc:sqlserver://<IP>;database=FleetManagement' --username  --password  --table SettingAttribute -- --schema Administration  --hcatalog-database FleetManagement --hcatalog-table Administration_SettingAttribute_orc --create-hcatalog-table --hcatalog-storage-stanza "stored as orcfile"

我不确定是否支持sqoop,我尝试过,但文件只导入到hdfs,而不是hcatalog/hive:

sqoop import-all-tables --hcatalog-home /usr/hdp/current/hive-webhcat --hcatalog-database FleetManagement_Common --create-hcatalog-table --hcatalog-storage-stanza "stored as orcfile" --connect 'jdbc:sqlserver://<IP>;database=FleetManagement' --username --password -- --schema Common

我很想知道是否有一种方法可以一步将所有表从rdbms模式导入hive/hcatalog?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题