Redirect-row behavior sends rows with component errors or truncations to a separate error output instead of discarding them or failing the data flow. This preserves dirty data from untrusted sources while allowing the main load to continue. section 6.1
Configure redirect-row handling as a controlled error path:
- Create an error-handling table with columns for the failed source row, error code, and error column. section 6.1
- Add a destination for failed rows and connect the component’s red error-output connector to it. section 6.1
- Set the Error Output page to redirect rows with errors and truncations. section 6.1
- Map the error-output column manually when destination names differ, because automatic mapping may fail. section 6.1
- Review redirected rows with application support to decide whether to repair them, discard them safely, or request a corrected extract. section 6.1
Mistake: ignoring bad rows
A flat-file load fails because a significant cookie ID is invalid. Setting the source to ignore failures makes the package appear successful, but silently loses data. Redirecting the row inserts it into ImpressionLoadFailures for investigation while the valid rows continue loading. section 6.1
Listing 6.2 Creating an error table
CREATE TABLE staging.ImpressionLoadFailures ( FlatFileSourceErrorOutputColumn VARCHAR(MAX) NOT NULL, ErrorCode VARCHAR(MAX) NOT NULL, ErrorColumn VARCHAR(MAX) NOT NULL ) ;
Use the error-table definition as a starting point for storing the failed source value, error code, and error column. section 6.1
