Monday, February 20, 2017

Sqoop Import from RDBMS to Hive Table


Using Sqoop Import we can even import the data from Relational Databases to Hive table in following ways.
  • Its very simple use –hive-import option, If you want to just load the data from RDBMS into new Hive Table or
  • If you have a hive table already with data, then you can use –hive-overwrite option this option will overwrite the existing table data.
Let us practice this Sqoop Import from RDBMS to Hive table by following step by step Instructions.
Here is the Mysql Table called Student in StudentInfo Data Base.
Let us import the above Mysql Table into Hive
use the following Sqoop Import with –hive-import Option.
sqoop import  \
–connect ‘jdbc:mysql://localhost/StudentInfo’  \
–table ‘student’  \
–username root
–password cloudera
–split-by std_id  \
–hive-import

No comments:

Post a Comment

How To Fix Hive – Partition Table Query Failed When Stored As Parquet

This article is about the bug in Hive filtering option, when the partition table query stored as parquet. Big data developers will help y...