sqoop import --connect jdbc:mysql://remote-ip/db --username xxx --password xxx --table tb --hive-import
上述命令進口表TB到「default
」蜂巢數據庫。如何使用Sqoop當使用指定的蜂房數據庫導入
我可以使用其他數據庫嗎?
sqoop import --connect jdbc:mysql://remote-ip/db --username xxx --password xxx --table tb --hive-import
上述命令進口表TB到「default
」蜂巢數據庫。如何使用Sqoop當使用指定的蜂房數據庫導入
我可以使用其他數據庫嗎?
關閉我的頭頂,我記得你可以指定--hive-table foo.tb
其中foo是你的蜂巢數據庫和TB是你的蜂巢表。
所以你的情況這將是:
sqoop import --connect jdbc:mysql://remote-ip/db --username xxx --password xxx --table tb --hive-import --hive-table foo.tb
作爲一個註腳,原來這裏是JIRA問題https://issues.apache.org/jira/browse/SQOOP-322
可以作爲--hive表的一部分指定數據庫名稱參數,例如「--hive-table foo.tb」。
有新的請求爲正在跟蹤的數據庫添加特殊參數SQOOP-912。
sqoop進口--connect JDBC:MySQL的://本地主機/阿倫--table帳戶--username根--password根-m 1 --hive導入--hive數據庫公司--create -hive-table --hive-table account --target-dir/tmp/customer/ac