我能够将整个数据库表从oracle db直接导入到hive表中,但不能将查询的输出导入到hive表中。我在以下命令中添加了查询。请在下面的命令中建议是否有任何更改。提前致谢。
sqoop import --connect jdbc:oracle:thin:@success.it.com --username ABCD --password 1234 --table students --query "select * from students" -m 4 --hive-import --hive-table mydb.students
--split-by <COLUMN_NAME>
到命令WHERE $CONDITIONS
到您的查询这应该够了吧
sqoop import \
--connect jdbc:oracle:thin:@success.it.com \
--username ABCD \
--password 1234 \
--table students \
--query 'select * from students WHERE $CONDITIONS' \
--split-by some_column_name
-m 4 \
--hive-import \
--hive-table mydb.students
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句