Hive Table Creation Through Sqoop

Other topics

Remarks:

Importing data directly from RDBMS to HIVE can solve lots of time. Also we can run a freeform query(a join or some simple query) and populate it in a table of our choice directly into Hive.

--hive-import tells Sqoop that the final destination is Hive and not HDFS.

--hive-table option helps in importing the data to the table in hive chosen by us, otherwise it will be named as the source table being imported from RDBMS.

Hive import with Destination table name in hive

$ sqoop import --connect jdbc:mysql://10.0.0.100/hadooptest 
--username hadoopuser -P
--table table_name --hive-import --hive-table hive_table_name

Contributors

Topic Id: 10685

Example Ids: 32056

This site is not affiliated with any of the contributors.