#NoPayJan Offer - Access all CloudxLab Courses for free between 1st to 31st Jan

  Enroll Now >>

Sqoop Import - MySQL to Hive

Hands-On Steps

#Get the detail of MySQL server using "My Lab" tab. Look at the MySQL credentials tab on the lab details page (https://cloudxlab.com/my-lab#mysql-credentials)

# Check the MySQL: Connect
mysql -h cxln2.c.thelab-240901.internal -u sqoopuser -pNHkkP876rp

#Select the sqoopex database
use 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://cxln2.c.thelab-240901.internal/sqoopex --table widgets -m 2 --hive-import --username sqoopuser -P --hive-database sqoop_testing --split-by id

#Start hive
use sqoop_testing;
select * from widgets;

No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...