Reject links in DataStage
When a DataStage connector or stage includes one or more reject links, records that meet specified reject criteria are automatically routed to the target stage on the reject links. Processing continues for the remaining records.
Single reject link supported connectors
- Amazon Redshift
- Amazon RDS for MySQL
- Amazon RDS for Oracle
- Amazon RDS for PostgreSQL
- Apache Cassandra
- Apache Derby
- DataStax Enterprise
- Db2®
- Db2 Big SQL
- Db2 for i
- Db2 for z/OS®
- Db2 on Cloud
- Db2 Warehouse
- Greenplum
- IBM Cloud Databases for MySQL
- IBM Cloud® Databases for PostgreSQL
- IBM® Data Virtualization Manager for z/OS
- IBM Db2 for DataStage
- IBM MQ
- Informix®
- Generic JDBC
- MariaDB
- Microsoft Azure SQL Database
- Microsoft SQL Server
- MySQL
- Netezza® (PureData® System for Analytics)
- ODBC
- Oracle
- Oracle Database for DataStage
- PostgreSQL
- Salesforce API for DataStage
- SAP ASE
- SAP HANA
- SingleStoreDB
- Sequential file, when used as a target
- Sequential file, when used as a source and when the node has more than one output link
- Snowflake
- Teradata
- Teradata database for DataStage
Multiple reject link supported connectors
- IBM Db2 for DataStage
- Generic JDBC
- IBM MQ
- ODBC
- Oracle Database for DataStage
- Salesforce API for DataStage
- Teradata database for DataStage
Single reject link supported stages
- Column Export
- Column Import
- External Source, when the node has more than one output link
- External Target
- Filter
- Java Integration
- Lookup
- Merge, when the node has more than one output link
- Operational Decision Manager
- Switch
Multiple reject link supported stages
- Operational Decision Manager
Specifying reject links while connector is a target
You can use Snowflake connector as a target with only single reject link. 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. 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 conditions, the connector reports an error and stops the job.
To configure a reject link:
- On the job design canvas, add and configure a target stage that will receive the rejected records.
- Drag the link from the Snowflake connector to the target stage.
- If the link is the first link for the Snowflake connector, double-click the link and choose the Reject link type. If the Snowflake connector already has an input link, the new link to the target stage automatically displays as a reject link.
- In the Output tab of the Snowflake connector, click the Reject tab.
- From the Reject rows based on selected condition option, select one or
more conditions for rejecting records. Reject conditions determine when a record is rejected.
Table 1. Reject conditions for the Snowflake connector Reject condition Description Row not deleted The specified DELETE statement was performed on the record, and the statement did not result in an error. However, no rows were deleted from the target table. This condition is only applicable to the Delete write mode.
Row not inserted The specified INSERT statement was performed on the record, and the statement did not result in an error. However, no rows were inserted in the target table. This condition is applicable to the following write modes: Insert, Insert then update, Delete then insert.
Row not updated The specified UPDATE statement was performed on the record, and the statement did not result in an error. However, no rows were updated in the target table. This condition is applicable to the following write modes: Update, Insert then update.
SQL error The driver reports an error when it tries to perform the write operation that is specified by the connector. This condition is applicable to all write modes.
- From the Add to reject row option, select ERRORCODE to include the Snowflake error code or ERRORMESSAGE to include the error message that describes the failure when a record fails. You can also include both.
- From the Abort when option, you can choose to stop a job based on the percentage of rows that fail, or based on the number of rows that fail.
- Save your changes.
Specifying reject links while connector is a source
- A mandatory column that holds the rejected record.
- An optional column that holds a message about why the record was rejected. You can remove the optional column.
In the Output tab, you can click Usage and select Yes for Is reject link to automatically add or remove the columns.