Sqoop Export - Delimiters

sqoop
#1

Hi All,

Sqoop Export using delimiters is not exporting all the data from HDFS.

Here is the data i am trying to export.
[cloudera@quickstart ~]$ hadoop fs -cat /user/cloudera/sqoop_import/departments/p*
“2”|“Fitness”:“3”|“Footwear”:“4”|“Clothing”:“5”|“Golf”:“6”|“Outdoors”:“7”|“Toys”:“8”|“Electronics”:“9”|“Kids”:“10”|“Kitchen”:

Here is the command:

sqoop export
–connect “jdbc:mysql://quickstart.cloudera:3306/retail_db”
–username=retail_dba
–password=cloudera
–table departments
–export-dir /user/cloudera/sqoop_import/departments
–input-enclosed-by "
–input-fields-terminated-by |
–input-lines-terminated-by :
–outdir java_files

Here is the result. It only exported 4 records.
mysql> select * from departments;
±--------------±----------------+
| department_id | department_name |
±--------------±----------------+
| 2 | Fitness |
| 4 | Clothing |
| 6 | Outdoors |
| 8 | Electronics |
±--------------±----------------+
4 rows in set (0.00 sec)

Any suggestions?

0 Likes

#2
0 Likes