Rejecting records that contain errors

When the connector includes a reject link, records that meet specified reject criteria are automatically routed to the target stage of the reject link, and processing continues for the remaining records.

Before you begin

  • Create a job that includes the connector and required links.
  • Define a connection to the database.
  • Set up column definitions on the links.
  • Specify the write mode and the target table.

About this task

When you configure a reject link, you select one or more conditions that control when to reject a record and send it to the target stage that receives the rejected records. You can also choose to include the error code and error message that is generated when a record fails. If you do not define a reject link or if you define a reject link but a failed record does not match any of the specified reject criteria, the connector reports a Fatal error and stops the job.

If the connector has multiple input links, you can specify multiple reject links. You use the Reject from link field to specify the input link to associate with the reject link.

Procedure

  1. Configure a target stage to receive the rejected records.
  2. Right-click the connector and drag to create a link from the connector to the target stage.
  3. If the link is the first link for the connector, right-click the link and choose Convert to reject. If the connector already has an input link, the new link automatically displays as a reject link.
  4. Double-click the connector to open the stage editor.
  5. Click the Reject tab.
  6. If the connector has multiple reject links, in the Reject from link field, select the input link to associate with the reject link.
  7. In the Reject rows based on selected conditions list, select one or more conditions to use to reject records.
    Note: If you do not choose any conditions, none of the rows are rejected. In this case, any error that occurs while the records are being written to the target table results in job failure.
  8. Use one of the following methods to specify when to stop a job because of too many rejected rows:
    • In the Abort when field, select Percent. Then in the Abort when (%) field, enter the percentage of rejected rows that will cause the job to stop. In the Start count after (rows) field, specify the number of input rows to process before calculating the percentage of rejected rows.
    • In the Abort when field, select Rows. Then in the Abort after (rows) field, specify the maximum number of reject rows allowed before the job stops.
  9. In the Add to reject row list, select additional columns to include in the rejected data. For example, if you are using the Oracle connector, you might select the ERRORCODE and ERRORMESSAGE columns, which contain information about why a row is rejected.