sqoop - Sqoop Job - apache sqoop - sqoop tutorial - sqoop hadoop
What is Sqoop job?
- Sqoop job creates and saves the import and export commands.
- Sqoop job command allows us to create a job.
- Job remembers the parameters used to create job, so they can be invoked any time with same arguments.
- It specifies parameters to identify and recall the saved job.
- This re-calling or re-executing is used in the incremental import, which can import the updated rows from RDBMS table to HDFS.
Learn sqoop - sqoop tutorial - sqoop job Re-Calling - sqoop examples - sqoop programs
Apache Sqoop Job Command With Example:
- The apache sqoop job defines how to create and maintain the Sqoop jobs.
- It specifies parameters to identify and recall the saved job. This re-calling or re-executing is used in the incremental import, which can import the updated rows from RDBMS table to HDFS.
Step 1 - Change the directory to /usr/local/hadoop/sbin
Step 2 - Start all hadoop daemons.
Step 3 - The JPS (Java Virtual Machine Process Status Tool) tool is limited to reporting information on JVMs for which it has the access permissions.
Step 4 - Change the directory to /usr/local/sqoop/bin
Sqoop options:
Argument | Description |
---|---|
--create | Defines a new job withthe specified job-id(name).Actual sqoop import command should be seperated by "--" |
--delete | Deletes a saved job. |
--exec | Executes the saved job. |
--show | show the save job configuration |
--list | Lists all the saved jobs |
Create Job (--create)
- Here we are creating a job with the name myjob, that can import the table data from RDBMS table to HDFS.
- The below command is used to create a job that is importing data from the wikitechy_employee table in the db database to the HDFS file.
Verify Job (--list):
- The '--list' argument is used to verify the saved jobs.
- Use the below command to verify the list of saved Sqoop jobs.
Learn sqoop - sqoop tutorial - Sqoop Job List - sqoop examples - sqoop programs
Inspect Job (--show):
- This '--show' argument is used to inspect or verify particular jobs and their details.
- The below command and the output is used to verify a job called myjob.
Learn sqoop - sqoop tutorial - Sqoop Job Show - sqoop examples - sqoop programs
Execute Job (--exec):
- This '--exec' option is used to execute a saved job.
- Use the below command to execute a saved job called myjob.
Learn sqoop - sqoop tutorial - Sqoop Job Exec - sqoop examples - sqoop programs
Verify after executing:
Learn sqoop - sqoop tutorial - Sqoop Job Verify - sqoop examples - sqoop programs