A fail condition in SQL rules refers to a scenario where the logical test or constraint defined within a rule determines that the rule has failed. Records evaluated against this rule are then marked as failed records. When you define fail conditions, if a Data Quality pipeline uses the SQL rule as a source, the pipeline processes only the records that meet the defined fail condition, along with the fields you selected in the SQL rule.
- Choose Fail condition to process failed records.
- Make sure to select the fields which you want available in the Data Quality pipeline; the pipeline can only process fields selected in this rule.
Fail condition for SQL queries
To configure a fail condition using a SQL query:
- Click Fail condition.
- Enter your SQL query within the Fail condition text box. You can write SQL queries using the available SQL functions, and correlate data across multiple tables directly.
- After the query is entered, the specified conditions are evaluated based on the input, and the rule is evaluated accordingly based on the defined fail conditions.
- After the rule evaluation completes successfully, the failed count displays the total number of records that met the defined fail condition.
After a rule is evaluated, you can use the records that the rule processed as a source in the Data Quality pipeline.