Sqoop export issue on Big-data labs

I am getting following issues while sqoop export to mysql on bigdatalabs.

Following command is working,
sqoop export --connect jdbc:mysql://nn01.itversity.com:3306/retail_import --table departments_null --username retail_dba --password itversity --export-dir “/apps/hive/warehouse/nikkhiel.db/departments_null” --input-null-string nvl --input-null-non-string -999 --input-fields-terminated-by ‘\001’

Following export is failing giving error task failed (departments table has primary key)
sqoop export --connect jdbc:mysql://nn01.itversity.com:3306/retail_import --username retail_dba --password itversity --table departments --input-fields-terminated-by ‘\001’ --input-null-string nvl --input-null-non-string -999 --export-dir ‘/apps/hive/warehouse/nikkhiel.db/departments_null’

Following export is failing (departments_export table has no primary key) but export 7 out of 9 records
sqoop export --connect jdbc:mysql://nn01.itversity.com:3306/retail_import --username retail_dba --password itversity --table departments_export --input-fields-terminated-by ‘\001’ --input-null-string nvl --input-null-non-string -999 --export-dir '/apps/hive/warehouse/nikkhiel.db/departments_null’
error
17/01/22 04:44:40 INFO mapreduce.ExportJobBase: Transferred 750 bytes in 22.7913 seconds (32.9074 bytes/sec)
17/01/22 04:44:40 INFO mapreduce.ExportJobBase: Exported 7 records.
17/01/22 04:44:40 ERROR mapreduce.ExportJobBase: Export job failed!
17/01/22 04:44:40 ERROR tool.ExportTool: Error during export: Export job failed!

After codegen and using jar and class file following export working ok export 9 out of 9 records.
sqoop export --connect jdbc:mysql://nn01.itversity.com:3306/retail_import --username retail_dba --password itversity --table departments_export --input-fields-terminated-by ‘\001’ --input-null-string nvl --input-null-non-string -999 --export-dir ‘/apps/hive/warehouse/nikkhiel.db/departments_null’ --jar-file departments_null.jar --class-name departments_null

17/01/22 04:45:42 INFO mapreduce.ExportJobBase: Transferred 1.0518 KB in 21.2497 seconds (50.6831 bytes/sec)
17/01/22 04:45:42 INFO mapreduce.ExportJobBase: Exported 9 records.

Pls help to understand regarding failing export jobs;

Thank you.

You have to get to job logs to see where the issue is.