This is continuation part to “SQOOP Complete Tutorial” and in this part we will see how to create and save the jobs in Sqoop.
Instead of rewriting commands that need to be run many times, Sqoop allows you to save them as jobs. When it comes to incremental import, this is a common occurrence. A saved job keeps track of the configuration information needed to run a Sqoop operation later. Job descriptions are stored to a private repository at $HOME/.sqoop/ by default, but this can be modified to make saved jobs available to many users on a shared cluster.
The following are the arguments that you should be aware of while dealing with Sqoop jobs.
Define a new saved job with the specified job-id (name). A second Sqoop command-line, separated by a — should be specified; this defines the saved job.
The user credentials can be ignore while creating the job and can be passed during the execution.
Delete a saved job.
$ sqoop job –delete JobTestDBImport
Given a job defined with –create, run the saved job.
$ sqoop job –exec JobTestDBImport
$ sqoop job –exec JobTestDBImport –username root -P
Show the parameters for a saved job.
$ sqoop job –show JobTestDBExport
List all saved jobs
$ sqoop job –list
Hope you find this article helpful.
Please subscribe for more interesting updates.