This is the continuation part of “Sqoop Complete Tutorial”. If you want to read –
Part-2, please click here.
Part-3, please click here.
Part-4, please click here.
Part-5, please click here.
Part-6, please click here.
Part-7, please click here.
18) Importing a table from MySQL to Hive’s default database.
Importing a table from MySQL to Hive’s default database. The below command will help in copying “emp” table and data from MySQL to Hive “default” database as “employee”.
sqoop import
–connect jdbc:mysql://localhost/empdept
–table emp
–username root
–password cloudera
–hive-import
–hive-table employees
19) Importing a table from MySQL to Hive’s user database.
sqoop import
–connect jdbc:mysql://localhost/empdept
–table emp
–username root
–password cloudera
–hive-import
–hive-table employees
–hive-database dbTest
Verifying the data:
Please click here for the next part.
6 comments