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  \



Leave a comment

Your email address will not be published. Required fields are marked *