Automation rules
Use automation rules to automate the process of governing your data.
Automation rules help you automate some of the tasks that you run on your data to ensure the highest data quality. These tasks include applying rule definitions and data quality dimensions, assigning terms or stewards to assets, analyzing assets and more.
Automation rules are if ... then
rules, which you create by dragging
block elements. If the specified conditions are met, the specified action is taken. The example
syntax of the rule might be if the asset is classified by the data class Account number,
then bind the data rule definition FieldIsNumeric
.
Automation rules are run automatically as a part of the discovery, and data quality analysis process.
- Prerequisites
-
- InfoSphere® Information Analyzer must be installed.
- To view automation rules, Information Governance Catalog User role, or higher is required.
- To create, edit, delete automation rules, and to generate suggested automation rules, Information Analyzer Project Administrator role is required, and a role to access Information Governance Catalog.
- To run automation rules, configure the project where you want to run them. Go to Data quality tab, select the Enable automation rules option. . In the
Automation rules status
- Accepted
- This status indicates that the rule is active and that the assets that are specified in the rule logic are affected. Set this status when you want the rule to be active.
- Candidate
- This status indicates that the rule isn't active, and the rule logic doesn't have any impact on the specified assets. Set this status when the rule isn't ready to be used yet.
- Error
- This status indicates that the rule is invalid. For example, an asset that was used in the rule logic was deleted from the catalog.
Automation rules structure
- logic
- conditions
- actions
- Logic
- The basic logic is
if condition then action
. You can expand this logic by adding more conditions and joining them by usingand
, andor
operators.
- Conditions
-
the name of the asset is asset_name
- the rule is applied for the selected asset.the asset has the term term_name assigned
- the rule is applied when the asset has the specified term assigned.the asset has a term assigned with the attribute attribute_name which has the value value
- the rule is applied when the asset has a term with the specified attribute set to the specified value.the asset has the label label_name assigned
- the rule is applied when the asset has the specified label assigned.the asset is a asset_type
- the rule is applied if the asset is of the specified type. You can select between columns and tables.the asset has the attribute attribute_name assigned which has the value value
- the rule is applied when the asset has the specified attribute set to the specified value.the asset is classified by the data class data_class_name
- the rule is applied when the asset is classified by the specified data class.the asset is contained in the host host_name
- the rule is applied if the specified host contains the asset.the asset is contained in the schema schema_name
- the rule is applied if the specified schema contains the asset.the asset is contained in the data source datasource_name
- the rule is applied if the specified data source contains the asset.the asset is in the project data_quality_project_name
- the rule is applied if the asset is in the specified project.the quality score of the asset is more/less than 1-100%
- the rule is applied if the quality score of the asset is more or less than the specified value.the quality score of the asset is above/below its quality threshold
- the rule is applied if the quality score of the asset is above or below the asset's quality threshold.
- Actions
-
bind the data rule definition data_rule_definition_name
- if the conditions are met, the specified data rule definition is bound to the asset.use the data quality dimension data_quality_dimension_name
- if the conditions are met, the specified data quality dimension is used.use all the data quality dimensions
- if the conditions are met, all data quality dimensions are usedset the data quality score threshold to 1-100 %
- if the conditions are met, the data quality score threshold is set to the specified value.
Running automation rules
- In the Quality tab, find the project for which you want to run a discovery or analysis.
- In the project settings, open the Data quality tab.
- Select the Enable automation rules option.
- Run a data quality analysis. For more information, see the Running a data quality analysis topic.
- Run a data discovery. For more information, see the Running automated discovery topic.
Importing, exporting, and deleting automation rules from command line
You can import, export, and delete automation rules by using the IAAdmin commands. For more information, see the Commands to import, export, and delete automation rules topic.
Example scenario
Passport
assigned to make sure that the passport number
complies with the standard passport number formatting. As a prerequisite to this task, you must have
a data rule definition PassportNumMatchesRegex
. Complete the following steps:- Create the term
Passport
in . - Look for all columns that contain passport values in catalog search. In Catalog, select Database Column as the asset type, enter passport, and press Enter. In the results list, you can use advanced filters to narrow down search results.
- For each column that contains passport numbers, complete the following steps:
- Open the details page of a column, and from the menu click Edit.
- In the Assigned to Terms field, find your newly created term and add it to the list.
- Save the changes.
- Create an automation rule in .
- Add the name
Check passport numbers
, and provide descriptionIf the term passport is assigned to an asset, then automatically bind the asset to the data rule definition PassportNumMatchesRegex
. - Set the status to Accepted to activate the rule.
- Specify the rule logic.
- Click Conditions, and select the asset has the term
assigned. Drag it to the if element, and find the term
Passport
. Save it. - Click Actions, and select bind the data rule
definition. Drag it to the then element, and find the data rule
definition
PassportNumMatchesRegex
. Save it. - Save the rule. As a result, the data rule definition
PassportNumMatchesRegex
is bound as a quality rule to all columns that have the termPassport
assigned.
- Click Conditions, and select the asset has the term
assigned. Drag it to the if element, and find the term
- To apply your newly created rule on assets, you must run the discovery with data quality
analysis task.
- As a prerequisite, open project settings and Data quality tab. Select the Enable automation rules option.
- Run discovery in Analyze data quality task. . You must select the
- To review the discovery results, and see whether your automation rule discovered any cases of incorrect passport format, go to .