Sqoop import all table not working for unknown reason


#1

For some unknown reason, the following sqoop import is not working:

sqoop import-all-tables -m 1
–connect jdbc:mysql://ms.itversity.com
–username=retail_user
–password=itversity
–warehouse-dir=/user/hive/warehouse/paslechoix_txt
–as-textfile

save to avro is working:

sqoop import-all-tables -m 1
–connect jdbc:mysql://ms.itversity.com/retail_db
–username=retail_user
–password=itversity
–warehouse-dir=/user/hive/warehouse/paslechoix_avro
–as-avrodatafile

The only difference is: failed one is: --as-textfile and working one is: --as-avrodatafile

According to the official documentation: http://archive-primary.cloudera.com/cdh5/cdh/5/sqoop-1.4.6-cdh5.10.1/SqoopUserGuide.html#_delimited_text_formats_and_field_and_line_delimiter_characters, both should work.

Can anyone take a look and try it out and let me know?

Thank you very much.


#2

@paslechoix
You have not mentioned port after connection string and also mention database name.

Try below command:
sqoop import-all-tables -m 1
–connect “jdbc:mysql://ms.itversity.com:3306/retail_db”
–username=retail_user
–password=itversity
–warehouse-dir=/user/hive/warehouse/paslechoix_txt
–as-textfile


#3