Pass conditions define the specific criteria that must be met for the rule to be considered satisfied. These clearly outline the acceptable values using basic and logical operators for complex definitions. Pass conditions can be applied to the rules to evaluate the data based on the defined conditions.
- Basic conditions can be used for simple evaluation scenarios. You can configure a basic condition by selecting the value and the associated operator. The initial value field acts as an alias for all the target fields. Any condition configured in the Basic tab is converted into an expression in the advanced tab.
- Advanced conditions can be used for more complex evaluation scenarios.
Within the Advanced tab, you can configure an expression
using numerical, string and logical operators. Note: If the pass condition is being applied to a dataset, it is required to map all the fields first post which the rule can be created. A rule cannot be saved without all the fields being mapped.
Pass condition for fields
You can apply pass conditions to the fields to evaluate the data based on the defined conditions.
Basic condition
- Select the combination of
<attribute><operator><enter value><value>and type a value that should match the condition. - Select the combination of
<attribute><operator><select field ><field>and select a field that should match the condition. In this case, you can compare the selected field with field of same data type. You can use this for all available data types.
The available operators depend on the data type of the selected field.
For example if a boolean datatype is selected, then the third field would provide an option to choose between true or false and if a string datatype is selected, the user would be prompted to enter a specific value.
Pass condition for datasets
- Select the combination of
<attribute><operator><enter value><value>and type a value that should match the condition. - Select the combination of
<attribute><operator><select field><field>and select a field that should match the condition. In this case, you can compare the selected field with field of same data type. You can use this for all available data types.
Pass conditions for SQL queries
You can define pass conditions in quality rules by writing your own SQL queries. The SQL query option is only available if you have selected target assets through the SQL option. If you use SQL queries to verify pass conditions, the rule can include assets that are not cataloged in the Data Integrity Suite. The system will then calculate a quality score based on these assets. The number of assets identified during the rule evaluation is associated with the specific target asset.
- Click Add Pass Conditions.
- Enter your SQL query within the Pass 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 pass conditions.
- After successful rule evaluation, the passed count shows the total number of records that satisfied the conditions defined in the pass conditions.
- When you choose assets with the SQL option, you cannot select between basic or advanced pass conditions.
- If the passed count exceeds either the evaluated count or the number of records resulting from a SQL rule evaluation, the system does not produce a data quality score for the asset linked to that rule.
Advanced condition for fields and datasets
Advanced condition is used for complex evaluation operations. You can type the expression using the available operators and functions. The advanced condition is also called as "Expression Builder" since you can build your own complex expressions. The syntax is color coded for better understanding while typing expression. An error is flagged when you mistype or misuse an operator or a function.
- When using advanced conditions, it is mandatory to use left and right operands along with the operator.
- Field names are case sensitive while using advanced conditions.
Incorrect field name casing does not flag an error in the expression and
will not apply the set
condition.
For example, in
ucase(FirstName)=true, the condition is applied when you haveFirstNamefield in your dataset. Inucase(FIRSTNAME)=true, the condition is not applied if your dataset does not haveFIRSTNAMEfield and no error is flagged in the expression.