After you create your rule definition logic, you generate
data rules to apply the rule definition logic to the physical data
in your project.
You can generate data rules after you create rule definitions that
are defined with valid rule logic. After you create your rule logic,
you can apply the logic to physical data in your project. After you
generate data rules, you can save them, and re-run them in your project.
They can be organized in the various folders listed on the
Data
Quality tab in your project. The process of creating
a data rule definition and generating it in to a data rule is shown
in the following figure:
Figure 1. Process of creating and running
a data rule
When you create a data rule, you turn rule definitions into data
rules, and bind the logical representations that you create with data
in the data sources defined for your project. Data rules are objects
that you run to produce specific output. For example, you might have
the following rule definition:
fname = value
The
rule definition defines the rule logic that you will use when building
your data rule. When you create your data rule from this logic, you
might have the following data rule:
firstname = 'Jerry'
In
the example, the "fname" entry is bound to "firstname," a column in
your customer information table. "Jerry" is the actual first name
you are searching for. After you create your data rule, you can reuse
your rule definition to search for another customer's first name
by creating a new data rule. Another data rule you can create out
of the rule definition example is:
firstname = 'John'
You
can reuse your rule logic multiple times by generating new data rules.
You can generate a data rule in the following ways:
- By clicking a rule definition in the Data Quality workspace
and selecting Generate Data Rule from the Tasks
menu.
- By opening a rule definition, and clicking Test in
the lower right corner of the screen. Follow the Steps
to Complete list in the left corner of the screen to run
the test successfully. When you are done with the test, click View
Test Results. After viewing the test results, you can
save the test as a data rule. This means that all the bindings you
set when you were running the test become a data rule. Creating the
data rule here will create a copy of the test results as the first
execution of the data rule.