John sets up a job that includes one Hierarchical Data
stage and one Sequential File stage. He then configure columns for
the Sequential File stage.
About this task
The following figure shows the job that John creates.
The job includes a Hierarchical Data stage named Hierarchical_POST
and a Sequential File stage named Sequential_File_POST. The Hierarchical_POST
stage is linked to the Sequential_File_POST stage by a link named
httpPOST.
Procedure
- Start the IBM® InfoSphere® DataStage® and QualityStage® Designer client.
- In the Repository pane, right-click
the Jobs folder, and then click .
- Open the Real Time section of the
palette, and drag one Hierarchical Data stage to the canvas.
- 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.
- Create the job parameters:
- Select .
- On the Parameters tab, specify
the job parameters for the HTTP POST example, which are listed in
the following table, and then click OK.
Table 1. Job Parameters for the HTTP POST exampleParameter 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 |
- Create a link from the Hierarchical Data stage to the Sequential
File stage.
- Rename the stages and links as shown in the following table.
Table 2. Names for job elementsElement |
Name |
Hierarchical Data stage |
Hierarchical_POST |
Sequential File stage |
Sequential_File_POST |
Link from the Hierarchical_POST stage to the
Sequential_File_POST stage |
httpPOST |
- Configure the Sequential_File_POST stage:
- Double-click the Sequential_File_POST stage, and configure
the columns that are listed in the following table on the Columns
page.
Table 3. Columns for the Sequential_File_POST
stageColumn name |
SQL type |
success |
VarChar |
errorMessage |
VarChar |
faultHttpStatusCode |
VarChar |
faultHttpBody |
VarChar |
httpVersion |
VarChar |
statusCode |
VarChar |
reasonPhrase |
VarChar |
body |
VarChar |
- On the Properties page, configure the properties that
define the output file.
Table 4. Properties for the
output fileProperty |
Value |
|
The path where you want the output file to be
created, followed by the file name, for example, #Directory#/output_http.txt. |
|
Overwrite |
First line is column name |
True |
- Click OK to close the Sequential_File_POST
stage.
- Click , and name the job rest_POST.
Note: When you change the link name, or you add, delete, or
modify datastage columns or job parameters on the DataStage designer,
you need to reopen and save the assembly in the Hierarchical Data
stage to validate the assembly design.