Sqoop Import to hdfs, facing issues

When I try to do a simple sqoop import to hdfs, I use the following command

sqoop import --connect jdbc:mysql://localhost.localdomain:3306/test --table = IPLMatches --username=sqluser --password=sqlpwd --warehouse-dir= /user/cloudera/user1/sqoopimport

I am always getting the error :

At minimum, you must specify --connect and --table
Arguments to mysqldump and other subprograms may be supplied
after a ‘–’ on the command line.

This appears to be very confusing, as I have already provided the --connect and --table attributes…

Can you please help identify the bug in this… Thanks a lot for your help…

Command should look like this. If you use =, then you should not have spaces before and after =
(eg: --table=IPLMatches, not --table = IPLMatches)

sqoop import --connect jdbc:mysql://localhost.localdomain:3306/test  \
  --table IPLMatches \
  --username sqluser \
  --password sqlpwd \
  --warehouse-dir  /user/cloudera/user1/sqoopimport
1 Like

Thanks a lot… It worked… Such a silly syntax error…:frowning: