Example 3: Setting up the job and configuring the stages

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

About this task

The following figure shows the job that Tom creates to update InfoSphere® Information Governance Catalog terms by using the REST API. The job includes a Hierarchical Data stage named EditTerm and Sequential File stages named Get_Output and Put_Output. The EditTerm stage is linked to the Get_Output stage by a link named httpGET. The EditTerm stage is linked to the Put_Output stage by a link named httpPUT.

Updating InfoSphere Information Governance Catalog terms by using the REST API

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 two Sequential File stages to the canvas. Position the Sequential File stages 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 this example, which are listed in the following table, and then click OK.
      Table 1. Job Parameters for the example
      Parameter Name Prompt Type
      Directory Specify the directory where the input or output file is created String
      BGServer Specify the IP address of the Information Server Catalog server where the REST service is running String
      BGServerPort Specify the port number of the Information Server Catalog server on which the REST service is running String
  6. Create links from the Hierarchical Data stage to the Sequential File stages.
  7. Rename the stages and links as shown in the following table.
    Table 2. Names for job elements
    Element Name
    Hierarchical Data stage EditTerm
    Sequential File stage Get_Output
    Sequential File stage Put_Output
    Link from the EditTerm stage to the Get_Output stage httpGET
    Link from the EditTerm stage to the Put_Output stage httpPUT
  8. Configure the Get_Output stage:
    1. Double-click the Get_Output stage, and configure the columns that are listed in the following table on the Columns page.
      Table 3. Columns for the Get_Output stage
      Column name SQL type
      success VarChar
      errorMessage VarChar
      faultHttpStatusCode VarChar
      reasonPhrase VarChar
      statusCode Integer
    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, for example, #Directory#/FetchTerm_Author.txt.
      Target > File Update Mode Overwrite
      First line is column name True
    3. Click OK to close the Get_Output stage.
  9. Configure the Put_Output stage:
    1. Double-click the Put_Output stage, and configure the columns that are listed in the following table on the Columns page.
      Table 5. Columns for the Put_Output stage
      Column name SQL type
      success VarChar
      errorMessage VarChar
      faultHttpStatusCode VarChar
      faultHttpBody VarChar
      statusCode Integer
      reasonPhrase VarChar
    2. On the Properties page, configure the properties that define the output file.
      Table 6. 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, for example, #Directory#/EditTerm_Author.txt.
      Target > File Update Mode Overwrite
      First line is column name True
    3. Click OK to close the Put_Output stage.
  10. Click File > Save, and name the job rest_BG.