sqoop import --connect jdbc:mysql://remote-ip/db --username xxx --password xxx --table tb --hive-import上面的命令将表tb导入到'default‘Hive数据库。
我可以用其他数据库代替吗?
发布于 2013-03-21 18:54:58
我记得你可以在我头顶上指定--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
发布于 2016-02-01 07:31:43
使用Sqoop导入的Hive数据库:
sqoop import --connect jdbc:mysql://localhost/arun --table account --username root --password root -m 1 --hive-import **--hive-database** company **--create-hive-table --hive-table** account --target-dir /tmp/customer/ac
发布于 2013-03-24 01:28:47
您可以将数据库名称指定为--hive-table参数的一部分,例如"--hive-table foo.tb“。
有一个新的请求要为正在跟踪的数据库添加一个特殊参数:SQOOP-912。
https://stackoverflow.com/questions/15544400
复制相似问题