Validate source rows during SSIS import
On this page
Source constraints classify matching rows for logging and can exclude those rows from an SSIS import.
Fields
| Field | Meaning |
|---|---|
| Column | Associates the rule with a source column |
| Statement | Condition that identifies rows to which the rule applies |
| Do not import | Routes matching invalid rows away from the destination load |
| MessageStatement | SSIS expression used to produce the logged message. For NULL, empty or whitespace-only values, the generator uses the string literal "Error [ID]" or "Warning [ID]". Nonblank expressions are passed through unchanged. |
| Description | Human explanation of the rule |
In the inspected SSIS generator, Statement and MessageStatement are embedded in a Derived Column expression. They must use the expression language accepted by that SSIS component, not arbitrary T-SQL. A conceptual SQL condition copied from a query may need conversion.
Configure and verify
- Save the source before opening Constraints.
- Add a condition and a message expression that produce a non-null message for rows you want to flag.
- Enable Do not import for rejection; leave it off for logging while allowing the row through.
- Generate the SSIS package and inspect its Derived Column and error/warning routes.
- Test one matching row, one nonmatching row and a row with null inputs.
For example, the business rule may be “flag records older than the agreed cutoff.” Specify the date comparison and conversion in SSIS syntax for the actual source datatype; do not use a quoted SQL date literal without checking its SSIS interpretation.
The generated message output has a fixed string size of 255 characters. Error/truncation handling also depends on import logging settings. This behavior is not generalized to ADF constraints.
For the related fields and actions, see Source Constraints, including MessageStatement and Save.