Unable to import data from Mysql using sqoop


#1

Dear Team,

I am unable to import data to HDFS from MySql. I executed following query , it is throwing me error like Permission denied.

query::
sqoop import
–connect “jdbc:mysql://cxln2.c.thelab-240901.internal:3306/retail_db”
–username sqoopuser --P
–table orders
–target-dir /user//sqoop_import/retail_db/orders

Kindly find below screenshot for more details

Thanks & Regards,
Gowtham.


#2

Hi, Goutham.
Can you please check the HDFS taget_directory. You must give the HDFS path.
Please check the example below:-

import --connect jdbc:mysql:ip-172-31-13-154:3306/sqoopex --username sqoopuser --password NHkkP876rp --table widgets --target-dir hdfs:///user/Your_login_user_id/widgets_import

All the best.