SQOOP从ORACLE数据库导入特定架构中的所有表



我正在尝试使用Sqoop命令从Oracle数据库导入特定模式中的所有表:

sqoop import-all-tables --connect jdbc:oracle:thin:server:port:database --username x --password y --warehouse-dir warehouse-dir --hive-import --create-hive-table

但是这个Oracle数据库有更多的模式,我只需要从一个特定的模式导入所有表。

您应该使用额外的参数--exclude-tables <tables>,它指的是要从导入过程中排除的以逗号分隔的表列表。

https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html

如果使用--import-all-tables,那么要导入的表将是那些通过jdbc连接的用户具有选择权限的表。基本上,用户在all_tables中看到的那些表。

为了限制列表,另一个选项是使用不同的用户,一个对要导出到的表进行有限选择的用户

最新更新