Sqoop

3 / 7
Sqoop Import - MySQL to Hive

Hands On Steps


#Get the detail of mysql server using "My Lab" tab

# Check the mysql: Connect
mysql -u sqoopuser -p -h ip-172-31-13-154 sqoopex

#Check the mysql: Explore The table in mysql using 
select * from widgets;

# Import - It might ask for password. Keep the password
sqoop import --connect jdbc:mysql://172.31.13.154/sqoopex --table widgets -m 2 --hive-import --username sqoopuser -P --hive-database sqoop_testing


#Start hive
use sqoop_testing;
select * from widgets;