Skip to main content
Pentaho Documentation

Create Jobs

Overview

Explains how to create jobs.

Jobs are used to coordinate ETL activities such as:
  • Defining the flow and dependencies for what order transformations should be run
  • Preparing for execution by checking conditions such as, "Is my source file available?," or "Does a table exist?"
  • Performing bulk load database operations
  • File Management such as posting or retrieving files using FTP, copying files and deleting files
  • Sending success or failure notifications through email

For this exercise, imagine that an external system is responsible for placing your sales_data.csv input in its source location every Saturday night at 9 p.m. You want to create a job that will check to see that the file has arrived and run your transformation to load the records into the database. In a subsequent exercise, you will schedule the job to be run every Sunday morning at 9 a.m.

To complete this exercise, you must have completed the exercises in the Create Transformations section.

  1. Go to File > New > Job.
  2. Expand the General folder and drag a Start job entry onto the graphical workspace. The Start job entry defines where the execution will begin.
  3. Expand the Conditions folder and add a File Exists job entry.
  4. Draw a hop from the Start job entry to the File Exists job entry.
  5. Double-click the File Exists job entry to open its edit properties dialog box. Click Browse and select the sales_data.csv from the following location: ...\design-tools\data-integration\samples\transformations\files. Be sure to set the filter to CSV files to see the file.
  6. Click OK to exit from the Open File window.
  7. Click OK to exit from the Check if a file exists ... window.
  8. In Spoon, expand the General folder and add a Transformation job entry.
  9. Draw a hop between the File Exists and the Transformation job entries.
  10. Double-click the Transformation job entry to open its edit properties dialog box.
  11. Select the Specify by name and directory option. Click Select a transformation to run from the current repository button.  The Select repository object window opens.
  12. Expand the repository tree to find your sample transformation. Select it and click OK. File:/pdi_select_transformation_for_job.png
  13. Save your job as Sample Job. File:/pdi_job_example.png
  14. Click Run Job. When the Execute a Job dialog box appears, choose Local Execution and click Launch.  The Execution Results panel should open showing you the job metrics and log information for the job execution.File:/pdi_run_job.png