hadoop - How to use a specified Hive database when using Sqoop import -


sqoop import --connect jdbc:mysql://remote-ip/db --username xxx --password xxx --table tb --hive-import 

the above command imports table tb 'default' hive database.

can use other database instead?

off top of head recall can specify --hive-table foo.tb

where foo hive database , tb hive table.

so in case be:

sqoop import --connect jdbc:mysql://remote-ip/db --username xxx --password xxx --table tb --hive-import --hive-table foo.tb 

as footnote, here original jira issue https://issues.apache.org/jira/browse/sqoop-322


Comments