A database can reject data for a variety of reasons. The data might
contain unique constraint violations or data type mismatches, and database
errors might prevent a job from inserting data into a table. You can manage
rejected data in an IBM® DB2® Connector stage by creating a reject link. The reject
link writes rejected data to a designated target stage according to the selection
criteria that you specify.
Prerequisites
Before
performing these steps, define a job that includes a DB2 Connector stage. You must also define
a target stage that will receive the data.
Procedure
To define a reject link for a DB2 Connector stage:
- On the InfoSphere™ DataStage® parallel
canvas, right-click the DB2 Connector stage and drag the link to the target stage.
- If the link that you added is the second output link from this
connector, the new link is converted automatically into a reject link. The
reject link is displayed as an arrow that consists of dashes. If the new link
is the only output link, right-click the new link, and select Convert
to reject.
- Double-click the DB2 connector icon to open
the DB2 Connector
stage editor.
- In the top left corner of the stage editor, click the reject link,
and select the Reject tab.
- Optional: In the Filter rejected rows based
on selected conditions area, select the check boxes for the information
that you want to filter out of the rows that are sent through the reject link
to the target stage. If you do not select an option, the reject link writes
all rejected rows to the target stage.
Option |
Description |
Row not updated |
Filters
out rows that have been rejected because the rows could not be updated. |
SQL error |
Filters
out rows that have been rejected because an SQL error occurred. |
- Optional: In the Add to the reject row area,
select the appropriate check boxes to include error information with the rejected
rows.
- Specify one of the following options to control whether the job
fails when records are rejected:
- To stop job processing based on the number of rows that are rejected,
specify a number in the Abort when field, and select Rows.
- To stop job processing based on the percentage of processed rows that
are rejected, specify a number in the Abort when field,
select Percent, and specify the number of rows processed.
- Click OK to save your changes and close
the stage editor.