Sqoop job create failed

Very nice videos on Hadoop Certification on ur channel, brief and crisp.
Here is something I tried after watching video “Hadoop Certification - 05 Sqoop Import Incremental” , all ur commands worked for me except the "Sqoop job create "

Sqoop job create sqoop_job doesnt work , its stars erroring where I say --import . Pls comment. Here is my ‘job create’ command.

sqoop job --create sqoop_job1 --import --connect “jdbc:mysql://quickstart.cloudera:3306/retail_db” --username=retail_dba --password=cloudera --table departments --target-dir /user/cloudera/sqoop_import/departments --append --check-column “department_id” --incremental append --last-value 8 --outdir java_files

And my erroring starts like this,

17/01/25 13:10:21 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.5.0
17/01/25 13:10:21 ERROR tool.BaseSqoopTool: Error parsing arguments for job:
17/01/25 13:10:21 ERROR tool.BaseSqoopTool: Unrecognized argument: --import
17/01/25 13:10:21 ERROR tool.BaseSqoopTool: Unrecognized argument: --connect

Hi Lakshmi,

You need to give a space between – and import as – import in sqoop jobs. This is unlike our regular import and applicable only for sqoop jobs.
I noticed one more thing above though it is not associated to the error. You need not give --append while using --incremental append since it does not hold any significance.

Thanks.

2 Likes

Perfect , that helped. Job creates and showed in job --list . Thanks