Unable to run sqoop import


#1

I’m able to run sqoop, but import is not working.

sqoop list-databases --connect “jdbc:mysql://ip-172-31-20-247:3306” --username sqoopuser --password NHkkP876rp

this statement is running, but for the below sqoop import i’m getting error

sqoop import --connect “jdbc:mysql://ip-172-31-20-247:3306/retail_db” --username sqoopuser --password XXXXXXXXXX --table departments --as-textfile --target-dir=/user/2016ht134076761/departments


#2

as a general tip, please post what error you’re facing :slight_smile: messages from console will help other understand your issue.

in your script the --target-dir parameter is used incorrectly, there should not be an equal sign, try below syntax
–target-dir /user/2016ht134076761/departments


#3

thank you…it worked.

Cloudera vm accepts with and without =.