我正在尝试使用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
中看到的那些表。
为了限制列表,另一种选择是使用其他用户,一个用户只能选择要导出到的表。
关于oracle - SQOOP从ORACLE数据库导入特定模式中的所有表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63360420/