As we have created password file, let us understand how to create sqoop job.


We can use sqoop job --create to create the job.

Typically we create jobs for sqoop import, sqoop export etc.

Once we identified the relevant sqoop command, we can create the job with the command and password file.

We also need to assign unique id for the sqoop job

Here is the example to create a job for sqoop import command using sqoop job. Once the job is created we can list created jobs using sqoop job --list.


sqoop job \

  --create import_orders \

  -- import \

  --connect jdbc:mysql://ms.itversity.com:3306/retail_db \

  --username retail_user \

  --password-file file:///home/training/password_file \

  --table orders \

  --warehouse-dir /user/training/sqoop_import/retail_db \

  --delete-target-dir