Example 2: Setting up the job and configuring the stages

Tom sets up a job that includes one Hierarchical Data stage and one Sequential File stage. He then configures columns for the Sequential File stage.

About this task

The following figure shows the job that Tom creates. The job includes a Hierarchical Data stage named Hierarchical_ DELETE and a Sequential File stage named Sequential_File_DELETE. The Hierarchical_DELETE stage is linked to the Sequential_File_DELETE stage by a link named httpDELETE.

The HTTP DELETE example.

Procedure

  1. Start the IBM® InfoSphere® DataStage® and QualityStage® Designer client.
  2. In the Repository pane, right-click the Jobs folder, and then click New > Parallel job.
  3. Open the Real Time section of the palette, and drag one Hierarchical Data stage to the canvas.
  4. Open the File section of the palette, and drag one Sequential File stage to the canvas. Position the Sequential File stage to the right of the Hierarchical Data stage.
  5. Create the job parameters:
    1. Select Edit > Job Properties.
    2. On the Parameters tab, specify the job parameters for the HTTP DELETE example, which are listed in the following table, and then click OK.
      Table 1. Job Parameters for the HTTP DELETE example
      Parameter Name Prompt Type
      Directory Specify the directory where the input or output file is created String
      restServer Specify the IP address of the REST server where the REST service is running String
      restServerPort Specify the port number of the REST server on which the REST service is running String
  6. Create a link from the Hierarchical Data stage to the Sequential File stage.
  7. Rename the stages and links as shown in the following table.
    Table 2. Names for job elements
    Element Name
    Hierarchical Data stage Hierarchical_DELETE
    Sequential File stage Sequential_File_DELETE
    Link from the Hierarchical_DELETE stage to the Sequential_File_DELETE stage httpDELETE
  8. Configure the Sequential_File_DELETE stage:
    1. Double-click the Sequential_File_DELETE stage, and configure the columns that are listed in the following table on the Columns page.
      Table 3. Columns for the Sequential_File_DELETE stage
      Column name SQL type
      httpVersion VarChar
      statusCode VarChar
      reasonPhrase VarChar
    2. On the Properties page, configure the properties that define the output file:
      Table 4. Properties for the output file
      Property Value
      Target > File The path where you want the output file to be created, followed by the file name #Directory#/output_delete.txt.
      Target > File Update Mode Overwrite
    3. Click OK to close the Sequential_File_DELETE stage.
  9. Click File > Save, and name the job rest_DELETE.