Learning Pentaho Data Integration 8 CE(Third Edition)
上QQ阅读APP看书,第一时间看更新

Creating a Simple Job

In this tutorial, we will create a very simple Job that will create a folder. This will be enough for getting an idea of what jobs are about:

  1. Open Spoon.
  2. Navigate to File | New | Job or press Ctrl + Alt + N. A new Job will be created.
  3. Press Ctrl J. The Job properties window will appear. Give the Job a name and a description.
  4. Press Ctrl + S to save the Job.
  5. To the left of the screen, there is a tree with Job entries. Expand the General category of Job entries, select the START entry, and drag it to the work area, as shown next:

 Drag and drop a Job entry

Don't forget to start your sequence of Job entries with START. A Job can have any mix of Job entries and hops, as long as they start with this special kind of Job entry.

  1. Expand the File management category, select the Create a folder entry, and drag it to the canvas.
  1. Select both entries. With the mouse cursor over the second entry, right-click and select New hop. A new hop will be created. Your Job should look like this:

A simple Job

  1. Double-click on the Create a folder icon.
  2. We will create a folder in the same place where our Job is saved. For doing that, in the textbox next to the Folder name option, type ${Internal.Entry.Current.Directory}/SAMPLEFILES and click on OK.

${Internal.Entry.Current.Directory} is an internal PDI variable, that in execution time resolves to the folder where the Job is saved.

  1. Press Ctrl + S to save the Job.
  2. Press F9 to run the Job. A configuration window will appear. Click on Launch.
  1. At the bottom of the screen, you will see the Execution results section. Job metrics will appear as follows:

Job metrics tab

  1. Select the Logging tab. It will appear as the following screenshot:

Logging tab

  1. Explore your file system and go to the folder where you have saved the Job. In that folder, you should see a new folder named SAMPLEFILES.