DQ 1040 RuleSpecificationGuide en
DQ 1040 RuleSpecificationGuide en
10.4.0
This software and documentation are provided only under a separate license agreement containing restrictions on use and disclosure. No part of this document may be
reproduced or transmitted in any form, by any means (electronic, photocopying, recording or otherwise) without prior consent of Informatica LLC.
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial
computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such,
the use, duplication, disclosure, modification, and adaptation is subject to the restrictions and license terms set forth in the applicable Government contract, and, to the
extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License.
Informatica and the Informatica logo are trademarks or registered trademarks of Informatica LLC in the United States and many jurisdictions throughout the world. A
current list of Informatica trademarks is available on the web at https://www.informatica.com/trademarks.html. Other company and product names may be trade
names or trademarks of their respective owners.
Portions of this software and/or documentation are subject to copyright held by third parties. Required third party notices are included with the product.
The information in this documentation is subject to change without notice. If you find any problems in this documentation, report them to us at
infa_documentation@informatica.com.
Informatica products are warranted according to the terms and conditions of the agreements under which they are provided. INFORMATICA PROVIDES THE
INFORMATION IN THIS DOCUMENT "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT.
Table of Contents 3
Rule Sets that Read a Single Data Input. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Rule Sets with Dependent Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Rule Sets with Independent Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Parent Rule Sets and Child Rule Sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Rule Set Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Adding a Rule Set to a Rule Specification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Cut, Copy, and Paste Operations on Rule Sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Copying and Moving a Rule Set in a Rule Specification. . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Copying and Moving a Rule Set to a Different Rule Specification. . . . . . . . . . . . . . . . . . . . . 26
4 Table of Contents
Chapter 6: Test and Validation Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Test and Validation Operations Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Rules and Guidelines for Validation Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Validating a Rule Specification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Testing a Rule Specification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Testing a Rule Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Table of Contents 5
Preface
Read the Rule Specification Guide to learn how to configure rule specifications in Informatica Analyst. A rule
specification is an object that represents the data requirements of a business rule in logical form. You can
add a rule specification to a mapping in Informatica Developer to verify that the source data in the mapping
conforms to the criteria that the business rule specifies. You can also generate mapplets from a rule
specification and use the mapplets in mappings in Informatica Developer.
Informatica Resources
Informatica provides you with a range of product resources through the Informatica Network and other online
portals. Use the resources to get the most from your Informatica products and solutions and to learn from
other Informatica users and subject matter experts.
Informatica Network
The Informatica Network is the gateway to many resources, including the Informatica Knowledge Base and
Informatica Global Customer Support. To enter the Informatica Network, visit
https://network.informatica.com.
To search the Knowledge Base, visit https://search.informatica.com. If you have questions, comments, or
ideas about the Knowledge Base, contact the Informatica Knowledge Base team at
KB_Feedback@informatica.com.
Informatica Documentation
Use the Informatica Documentation Portal to explore an extensive library of documentation for current and
recent product releases. To explore the Documentation Portal, visit https://docs.informatica.com.
6
If you have questions, comments, or ideas about the product documentation, contact the Informatica
Documentation team at infa_documentation@informatica.com.
Informatica Velocity
Informatica Velocity is a collection of tips and best practices developed by Informatica Professional Services
and based on real-world experiences from hundreds of data management projects. Informatica Velocity
represents the collective knowledge of Informatica consultants who work with organizations around the
world to plan, develop, deploy, and maintain successful data management solutions.
You can find Informatica Velocity resources at http://velocity.informatica.com. If you have questions,
comments, or ideas about Informatica Velocity, contact Informatica Professional Services at
ips@informatica.com.
Informatica Marketplace
The Informatica Marketplace is a forum where you can find solutions that extend and enhance your
Informatica implementations. Leverage any of the hundreds of solutions from Informatica developers and
partners on the Marketplace to improve your productivity and speed up time to implementation on your
projects. You can find the Informatica Marketplace at https://marketplace.informatica.com.
To find your local Informatica Global Customer Support telephone number, visit the Informatica website at
the following link:
https://www.informatica.com/services-and-training/customer-success-services/contact-us.html.
To find online support resources on the Informatica Network, visit https://network.informatica.com and
select the eSupport option.
Preface 7
Chapter 1
Introduction to Rule
Specifications
This chapter includes the following topics:
A rule specification or mapplet applies the conditions and actions that you define to the values in each row in
a data source. The rule specification or mapplet generates an output value for each row. The output specifies
whether the row meets the requirements that you define for the business rule.
8
Related Topics:
• “Rule Specifications and Mapplets” on page 11
The shapes below the top-level shape are rule sets. A rule set contains rule statements that define the
business rule requirements at a low level. Each rule statement reads a column of input data and verifies that
the input data meets the conditions that you specify.
The rule set that connects to the top-level shape is the primary rule set. The primary rule set summarizes the
business rule. The output from the primary rule set determines whether each row of input data meets the
requirements of the business rule.
1. Top-level shape.
2. Primary rule set.
3. Child rule sets of the primary rule set.
4. Property options on the rule set that you select.
5. Rule statements in the rule set that you select.
6. Rule statement that the system defines.
You can add a rule set below any rule set in the rule specification. The rule sets have a parent-to-child
relationship. When you add a rule set, the output of the rule set that you add becomes an input to the parent
rule set.
Use rule sets to define the rule statements that analyze and update the input data. You can configure a rule
set with a single rule statement, or you can add multiple rule statements to the rule set. Within a rule set, data
flows from the first rule statement to the final rule statement.
You can copy or move a rule set to another location in a rule specification, and you can copy or move a rule
set to another rule specification.
Inputs
An input describes a column of data that a rule statement can analyze. An input represents a column in a
data set, or an input represents the output from another rule set in the rule specification.
• The data type of the data that the input represents. Create an input with a date/time, float, integer, or
string data type.
Note: You can specify an integer data type for numbers in the range -2147483648 through 2147483647.
To read numbers that are outside the integer range, use the float data type.
• The maximum number of characters that a value in the column can contain.
You can optionally enter a text description of the input.
An input does not store information about the business data, such as the name of a column, table, or
database. The Developer tool user adds the mapplet or the rule specification to a mapping and connects the
mapping inputs to the business data. You advise the developer about the columns to connect. The developer
can connect an input to any column that matches the properties that you define.
When you create a child rule set, the output from the rule set becomes an input to the parent rule set. You
must use the input in a rule statement in the parent rule set. When you create an input in the Manage Global
Inputs dialog box, you can optionally add the input to a rule statement. To view the inputs that a rule set uses,
select the rule set in the workspace.
Rule Statements
A rule statement is an IF-THEN statement that analyzes a column of data and generates an output based on
the result of the analysis. You add a rule statement to a rule set.
A rule statement uses conditions and actions to define the IF-THEN logic. A condition is a data operation that
determines a single fact about a data value. You can add multiple conditions to a rule statement.
An action is a data operation that generates the output from the rule set. An action generates data when the
input that you add to the rule statement satisfies the conditions that you define. The rule set uses the output
from the first rule statement that generates output data.
Each rule set contains a system-defined rule statement that specifies the action to take if no other rule
statement generates output data. The rule statement is the final rule statement in the rule set. You can edit
the action in the system-defined rule statement. By default, the rule statement specifies that the rule set does
not generate any output data if the other rule statements do not generate output data.
When you generate mapplets, the Analyst tool generates a mapplet for each rule set in a rule specification.
The mapplet that corresponds to the primary rule set contains the complete logic of the rule specification
and has the same name as the rule specification.
A Developer tool user can add a rule specification or a mapplet to a mapping. A mapping is a metadata
object that connects to a data source and writes to a target data object. Informatica stores mapplets and rule
specifications in the Model repository. The Model repository is the storage database for mappings, rule
specifications, mapplets, and other assets in the Informatica domain. Add a rule specification to a mapping
when you want to apply the logic in the current rule specification to the data source. Add a mapplet that you
generate to a mapping when you want to update the mapplet logic before you run the mapping.
A mapplet contains transformations. A transformation defines an operation to analyze or update data. Each
rule statement in a rule specification defines at least one transformation in a mapplet.
A mapplet can contain other mapplets. If you define a complex rule specification, the mapplet that you
generate contains multiple mapplets in a hierarchal structure. Each mapplet is a separate object in the Model
repository. Because a mapplet can contain other mapplets, you can add a mapplet to a rule statement in a
rule specification. The mapplet that you generate from the rule specification contains a reference to any
mapplet that you added to a rule statement.
• The mapplet contains complex function logic. You use the mapplet so that you do not have to define the
logic in the current rule specification.
• The mapplet contains function logic that you cannot configure in the Analyst tool. For example, the
mapplet contains address validation logic.
• The mapplet contains function logic that the organization approves for all Analyst tool users.
After a mapping runs, the developer can send you the data output from the mapping. You can evaluate the
data output to determine if the data source conforms to the business rule that the rule specification
describes. Alternatively, the developer or another user can run a profile on the mapping output. A profile is an
asset that describes the data patterns in a data set. You can evaluate the profile to determine the conformity
of the business data to the business rule. You can also create and run a profile in the Analyst tool.
Consider the following rules and guidelines when you work with mapplets and rule specifications:
• A mapplet is a reusable object. A Developer tool user can add a mapplet to multiple mappings. You can
add a mapplet to rule statements in multiple rule specifications.
A rule specification is also a reusable object. A Developer tool user can add a rule specification to
multiple mapplets and mappings. You cannot add a rule specification to a rule statement.
• When you generate mapplets from a rule specification, you create a mapplet for every rule set in the rule
specification. Each mapplet appears as a unique object in the Model repository.
• The mapplet that represents the primary rule set takes the name of the rule specification.
You can check in and check out rule specifications from a Model repository that supports version control.
You can undo a checkout, retrieve an earlier version, and restore a rule specification to an earlier version.
You can add a mapplet to a rule statement regardless of the versioned status of the mapplet. The rule
statement reads the most recent version of the mapplet in the Model repository.
The rule specification does not store version information for a mapplet that you add to a rule statement.
When you generate a mapplet from a rule specification, the mapplet that you generate includes the most
recent version of any mapplet that you add.
Before you configure the rule specification, verify that you understand the properties of the business data and
the requirements of the business rule.
Before you configure the rule specification in the Analyst tool, perform the following steps:
14
Verifying the Business Rule Requirements
Before you configure a rule specification, discuss the business rule with the data owners in the organization.
Verify that the business rule is valid and ready to apply to the business data.
1. Identify one or more data sets that the developer can select as a data source in a mapping. For example,
identify the database and the table that contain the data.
2. Verify the data types of the data columns that the mapplet analyzes. You specify the data types when
you create the inputs in the rule specification.
Note: You might not create an input for every column in the data set.
3. Discuss the steps to follow after the developer runs a mapping that contains the mapplet.
The developer gives you the results of each mapping. You determine if you need to update the rule
specification and generate the mapplet again. Alternatively, you determine if the business needs to
update the business data so that it conforms to the business rule.
Add rule sets and rule statements below the primary rule set to validate the data that the primary rule set
analyzes.
1. Create the inputs that the rule statements analyze. The inputs are a key prerequisite for the rule
statements. The inputs represent the columns in the business data set that the business rule applies to.
2. Identify the business rule conditions that the business data must satisfy. Plan a rule statement for each
condition.
3. Determine the sequence in which the rule statements must analyze the data.
Select the lowest dependencies in the business rule, and add a rule set for each dependency.
4. Add the rule sets that you need to the rule specification.
Work from the lowest level in the rule specification upward to the primary rule set.
5. Add the rule statements that you identified to the rule sets.
General
Lists the name, the description, and the Model repository location of the rule specification. You can
update the name and the description.
Assets
Lists the assets that link to the rule specification. The rule specification can link to mapplets and to
reference tables.
Click an asset name to open the asset in the workspace. Expand an asset to view the asset metadata.
The mapplets that you generate from the rule specification appear in the Generated Assets area. Any
mapplet or reference table that you select in a rule statement appears in the Related Assets area.
Rule Properties
Lists the properties that the rule specification applies to the output from each rule set.
The rule specification applies the following properties to the output data:
• Maximum string length. Determines the maximum length for text data. Default is 100.
• Maximum number length. Determines the maximum length for numeric data. Default is 10.
• Number of decimal places. Determines the maximum number of decimal places to include in the
output data. Default is 4.
Note: A rule set can read a maximum of four decimal places from input data of the float data type.
Time Period
Specifies the time period in which the mapplets that you generate from the rule specification can run in a
mapping. The properties apply to all mapplets that the rule specification generates, including any
mapplet that derives from a rule set or a rule statement within the rule specification. The properties do
not apply to a mapplet that you select in a condition or an action. By default, the rule specification does
not specify a valid time period.
If you run a mapping that reads a mapplet outside the valid time period, the mapping fails to run. You
can validate a rule specification and generate a mapplet rule from a rule specification outside the time
period.
The properties also apply to the test operations that you perform on the rule specification. You cannot
test a rule specification outside the time period.
Displays the inputs that you add to the rule sets as a set of fields that you can populate with test data.
Use the fields to verify that data flows through the rule specification in the ways that you expect. You
can test the rule specification, and you can test any rule set in the rule specification.
To test a rule specification or a rule set, enter sample data to the fields in the test area. You can cut,
copy, and paste data between test areas in the rule specification and between two rule specifications
that are open concurrently. When you save the rule specification, you save the sample data that you
entered.
To update the properties, open the rule specification and click Edit.
You can add a rule to a business term. The rule specifies the data conditions that the business term must
satisfy to be valid in the organization. For example, you might define a rule for the business term "Mortgage"
in a financial business glossary. The rule defines a mortgage as a set of data values that the mortgage
document must contain, such as the interest rate on the loan. You can create a rule specification from the
rule and link the rule specification to the rule.
Use the Assets options in the business term to open the Design workspace for rule specifications. Create a
rule specification, and define a rule statement for each data condition that the business term specifies.
Creating an Input
When you create an input, you can add the input to any rule set in the rule specification.
Note: The Input Management dialog box includes a Usage column. The Usage column indicates the number
of times that each input appears in a rule statement in the rule specification.
Consider the following rules and guidelines when you generate mapplets:
• If you update a rule specification after you generate mapplets, generate the mapplets again to update the
mapplets in the Model repository.
• If you generate a mapplet in a Model repository under version control, the operation checks in the mapplet
to the Model repository.
A fact is a piece of information that you derive from a data value when you compare it to other data values.
For example, a date value might indicate a birthday, or it might indicate the date that you sent an invoice to a
customer. You can use the date to determine if a person is an adult, or if a customer account is overdue. You
can use the facts that you determine about the person or about the customer to make business decisions. A
rule specification can determine a single fact, or it can determine multiple facts that operate in a dependent
relationship to each other.
When one fact about the business data depends on multiple other facts, create rule sets in a parent and child
relationship. Use the child rule sets to generate inputs that the parent rule set can verify. If a fact relates to a
single item of data, you can configure rule statements to analyze the data in a single rule set. If a fact
depends on multiple independent facts about the business data, create child rule sets in parallel to determine
each fact.
Consider the following rules and guidelines when you configure rule sets:
• Data flows upwards through a rule specification from the lowest rule set to the primary rule set. When the
rule specification includes parallel rule sets, the rule specification runs the parallel rule sets concurrently.
21
• A rule set generates a single output for a row of input data. The output from the first rule statement to
generate an action becomes the rule set output for the data row.
• The output from the primary rule set is the primary fact that the rule specification generates about the
business data. The primary rule set output represents the result of the business rule analysis of the data
row.
• The output from a child rule set is an input to a parent rule set. Every rule set that you add to a rule
specification is a child of the primary rule set or a child of another rule set.
You must use the output from the child rule set in a rule statement in the parent rule set.
• The input properties on a rule set display the inputs that you select in the rule set and the inputs from any
child rule set. To view all of the inputs in the rule specification, open the Manage Global Inputs dialog box.
• The rule statements in a rule set must generate outputs of the same data type. Otherwise, the rule set
might send data of different data types to an input in the parent rule set.
Note: You might also create reference tables that contains lists of the valid colors and styles. Configure the
conditions to compare the input values to the reference tables. You can create reference tables in the Analyst
tool.
General
Displays the rule set name and any description that you add to the rule set. You can update the name
and the description.
Enter a name that summarizes the type of data operations that the rule statements perform in the rule
set. The rule set name must be unique in the rule specification.
Inputs
Lists the inputs that the current rule set uses. If a rule set is a child to a parent rule set, the parent rule
set reads the child rule set name as an input name.
To view all of the inputs in the rule specification or to add an input to the rule specification, open the
Input Management dialog box.
Rule Logic
Displays the rule statements in the rule set. You can add and update the rule statements.
Test
Displays the rule set inputs in a table that you can use to test the rule set logic. The table includes the
inputs from any child rule set below the current rule set.
You can enter sample data values and verify that the rule set generates the results that you expect. To
test the complete rule specification, select the primary rule set.
You might copy a rule set to another rule specification to reuse the rule statements that the rule set contains.
You might copy a rule set within a rule specification to create rule statements that are similar to the rule
statements in the rule set.
You might move a rule set when you determine that the rule set is a dependency for a different business rule
requirement.
You copy or move a rule set to a position below another rule set. The rule set that you copy or move becomes
a child rule set of the destination rule set. When you copy or move a rule set to another rule specification, you
also copy the inputs that the rule set uses. You cannot move a primary rule set. You cannot copy a rule set to
the top-level rule specification shape.
Move a rule set when you determine that the rule set belongs in another location.
Move a rule set when you determine that the rule set belongs in another location.
A condition defines the type of analysis that the rule statement performs on the input data. An operator is a
mathematical function that determines how the rule statement processes the result of the condition analysis.
An action defines the output that the rule statement generates if the input data satisfies the condition.
The following image shows a series of rule statements in the Design workspace:
1. Sequence identifier.
Indicates the order in which the rule specification runs the rule statements in the rule set.
27
2. Condition type.
Indicates the condition or conditions in which the input data can be valid. When you create a rule
statement, you create an IF condition. When you add a condition to a rule statement, you create an AND
relationship between the conditions in the statement.
3. Input.
Identifies the data to analyze or update. You can select an input from the current rule set, or you can
select the output from a child rule set.
4. Operator.
Identifies the type of validation operation that the condition applies to the input data.
5. Condition fields.
Describes a fact that the rule statement verifies about the input data.
6. Action fields.
Describes the output that the rule statement generates when the input data satisfies the condition. If you
configure multiple conditions in the rule statement, the input data must satisfy all conditions to generate
an action.
7. Menu options.
Displays a list of options for the rule statement. You can use the options to link rule statement in the rule
set. When you link rule statements, the output from the first rule statement becomes the input to the
second rule statement.
Conditions
A condition is a data operation that a rule statement specifies for an input data value. Every rule statement
contains at least one condition.
When a condition validates an input data value, the rule specification performs the action in the rule
statement. If a condition cannot validate an input data value, the rule specification does not perform the
action.
The rule statement compares the values in the input column to the value that you enter.
The rule statement compares the values in the input column to the values on the same row in another
input column that you specify.
Compare the input data values to the current date and time.
The rule statement compares the values in the input column to the current date and time on the Data
Integration Service host machine.
The rule statement searches the input column for null or empty strings.
The rule statement compares the values in the input column to a range of values that you enter.
The rule statement compares the values in the input column to the values in a reference table. The rule
statement returns a value from the reference table or a value that you enter.
The rule statement compares the values in the input column to the output from a mapplet that you select
from the Model repository. You specify one or more inputs for the mapplet. You can select any input in
the rule specification, including the current condition input. You can also specify a constant value as a
mapplet input.
The rule statement applies a function expression that you select to the values in the input column. The
Analyst tool stores the list of expressions.
You can use the function options as an alternative to the inline condition options that the rule statement
displays in the workspace. You can also use the function options to configure a condition that reads multiple
inputs or that reads an asset from the Model repository.
Use the Define Condition dialog box to configure or select a function expression. To open the dialog box,
select function as the condition type in the rule statement.
1. Input
Use the Input options to compare an input data value to other data values in the following ways:
• Compare the rule statement input with an input from another column on the same row.
Conditions 29
• Compare the rule statement input with a value that you enter.
• Compare the rule statement input with a range of values that you enter.
2. Rules
Use the Rules options to compare an input data value to the output from a mapplet. Use the options to
select the mapplet from the Model repository. The Library workspace identifies the mapplets that you
can select as rules.
3. Reference Table
Use the Reference Table options to compare an input data value with the values in a reference table. Use
the options to select the reference table from the Model repository. The Library workspace lists the
reference tables that you can select.
4. Search
Use the Search options to find an input data value in another input column. The rule statement searches
all of the values in the column for the current rule statement input value.
5. Function
Use the Function options to apply a function expression to the input data. Select an expression from the
list in the dialog box.
6. Configurable options for the operation
Use the options to configure the condition.
Operators
An operator is a mathematical function that determines the outcome of a condition.
is
Verifies that the input data matches the data that the condition specifies.
is not
Verifies that the input data does not match the data that the condition specifies.
is within
Verifies that the input data matches a value in a reference table or in a list of values that you enter.
is not within
Verifies that the input data does not match a value in a reference table or in a list of values that you
enter.
contains
Verifies that the input data contains a sequence of characters that you specify.
is less than
Verifies that the input data value is less than the value that the condition specifies. Select the operator
with numeric input data.
Verifies that the input data value is less than or equal to the value that the condition specifies. Select the
operator with numeric input data.
Verifies that the input data value is greater than the value that the condition specifies. Select the
operator with numeric input data.
Verifies that the input data value is greater than or equal to the value that the condition specifies. Select
the operator with numeric input data.
Actions
An action specifies the output from a rule statement. An action generates an output value when the
conditions in the rule statement validate an input value.
For example, you might configure an action to return the word VALID when the input data matches a
reference data value.
Configure an action to return a data value from an input in the rule specification. The action reads the
data value on the corresponding row of the input that you select.
For example, a business might define a rule that requires all product records to use Quick Response (QR)
codes in place of bar codes. You configure an action to replace an input column of bar code values with
a corresponding column of QR code values.
Configure an action to return a data value from a reference table. The action compares the input data to
the values in the reference table that you specify. If the action finds the input data in the reference table,
the action returns the reference data value that corresponds to the input data.
For example, you might configure an action to compare first name data to a reference table that
identifies the gender of the first name. The action might read the word "JOHN" from the input data and
return the word "MALE" from the reference table.
Return a value that you enter when an input data value matches a reference table value.
Configure an action to return a data value from a reference table. The action compares the input data to
the values in the reference table that you specify. If the action finds the input data in the reference table,
the action returns the string that you entered. if the action does not find the input data in the reference
table, the action returns the input value.
For example, you might configure an action to compare employee code data to a reference table that
contains the valid employee codes in an organization. You define a function that returns the word
"VALID" when an employee code matches a value in the reference table. If the function does not find an
employee code in the reference table, the action returns the employee code from the input column.
Note: The action returns a data value for all records that satisfy the condition in the rule statement.
Actions 31
Return the current date and time.
Configure an action to return the system date and time to nanosecond precision from the Data
Integration Service host machine. The rule statement returns the date and time values in a date/time
data type. You must specify the format for the date and time.
For example, the input data might include a product name that the business no longer uses. Configure
the action to return a version of the input data that omits the product name.
The action compares the input data to the values in a reference table that you specify. If the action finds
an input data value in the reference table, the action returns a version of the input without the data value.
For example, you might configure an action to compare an input string to a reference table of salutation
terms. The action might read the input string "MR JOHN SMITH" and return the string "JOHN SMITH" as
the output.
Configure an action to delete character spaces from the input data. Remove character spaces when the
input data includes redundant character spaces.
For example, you might configure an action to remove character spaces from the following telephone
number:
212 555 1234
Use a function expression to determine the output value.
For example, you might configure the action to return the character length of the input data.
For example, you might configure an action to merge a column of first name data and a column of
second name data. The action returns a single field that contains the first name and second name.
Configure an action to convert the character case of an input that you select.
For example, a rule statement might read a data set that stores data values in sentence case. Configure
an action to return the data in uppercase.
Configure an action to apply a mapplet to the input data and to return the mapplet output. Select the
input from the rule specification, or enter a constant value as the mapplet input. Select the mapplet from
the Model repository.
A mapplet might represent a set of operations that the organization approves for use in for business
rules. Or, a mapplet might contain transformation logic that you cannot define in the other options in the
rule statement.
You can use the function options as an alternative to the inline action options that the rule statement
displays in the workspace. You can also use the function options to configure an action that reads multiple
inputs or that reads an asset from the Model repository.
To configure an expression, select the function option from the action menu. When you select the field, you
open the Define Action dialog box.
1. Convert Case
Use the Convert Case options to change the character case of the input data values.
2. Merge
Use the Merge options to return data values from multiple inputs as a single output.
3. Standardization
Use the Standardization options to update a copy of the input data value and to return the copy. You can
configure a standardization function to remove characters, to return a value from a reference table, or to
return a value that you specify.
4. Function
Use the Function options to apply a function expression to the input that you select and to return the
output of the expression.
5. Input
Use the Input options to return a data value. You can specify a constant value, or you can select an input.
If you select an input, the action returns the value in the input column on the same row as the condition
input.
6. Rules
Use the Rules options to return the output of a mapplet that you select.
Actions 33
7. Configurable options for the operation
Use the options to configure the action.
When you add a function expression to a condition, the function expression performs the calculation and
returns the result to the condition. The condition uses the rule statement operator to determine the next step.
When you add a function expression to an action, the action performs the calculation and returns the result
as the rule statement output.
To add a function expression to a condition, use the Function options in the Define Condition dialog box. To
add a function expression to an action, use the Function options in the Define Action dialog box.
Add to Date
Reads a date value and adds a numeric value to an element in the date. Enter the value to add to the
element, or select an input that contains the value to add. Select the function expression in a condition
or an action.
Choose
Reads input data that contains multiple values and selects the value at the position that you specify.
Select the function expression in a condition or an action.
Convert to Date
Converts a date value in an input string to a date/time data type. The function expression returns the
month, day, and year. You select the date format when you configure the function expression. Select the
function expression in an action.
Concatenate
Reads two inputs that you select and concatenates the values from the inputs. Select the function
expression in a condition or an action.
Date Difference
Reads date values from two inputs that you select and calculates the numeric difference between the
dates. You select the date element that the function expression uses to measure the difference. Enter
the date element, or select an input that contains the date element. Select the function expression in a
condition or an action.
Date Part
Reads a date from an input and identifies the numeric value of a date element that you specify. Enter the
date element, or select an input that contains the date element. Select the function expression in a
condition or an action.
Uses multiple values to specify a date and time. Enter a value for each date element, or select an input to
add a value to each element. Select the function expression in a condition or an action.
Greatest
Reads two or more values and identifies the highest value. Enter the values, or select rule set inputs to
add each value. You can specify numeric values, alphabetic values, or date values. Select the function
expression in a condition or an action.
When you specify numeric values, the function expression identifies the highest number.
When you specify alphabetic values, the function expression identifies the value that is last in alphabetic
order.
When you specify date values, the function expression identifies the latest date.
Last Day
Reads a date value from an input and identifies the last day in the month that the date specifies. The
function expression identifies the last day as a numeric value. Select the function expression in a
condition or an action.
Least
Reads two or more values and identifies the lowest value. Enter the values, or select rule set inputs to
add each value. You can specify numeric values, alphabetic values, or date values. Select the function
expression in a condition or an action.
When you specify numeric values, the function expression identifies the lowest number.
When you specify alphabetic values, the function expression identifies the value that is first in alphabetic
order.
When you specify date values, the function expression identifies the earliest date.
Length
Reads an input value and calculates the number of characters in the value. Select the function
expression in a condition or an action.
Lower
Reads an input string and returns the lowercase version of the characters in the string. Select the
function expression in a condition.
Null
Reads an input value and determines if the value is null. Select the function expression in a condition or
an action.
Replace Character
Reads an input value and replaces a sequence of characters in the value with a sequence that you
specify. Select the function expression in a condition.
Replace String
Reads an input value and replaces the value with a value that you specify. Select the function expression
in a condition.
Reverse
Reads an input value and reverses the order of the characters in the value. Select the function
expression in a condition or an action.
Reads an input value and truncates the value to the number of places that you specify. The function
expression reads a numeric value. Enter the value, or select an input to add the value. Select the function
expression in a condition or an action.
Upper
Reads an input string and returns the uppercase version of the characters in the string. Select the
function expression in a condition.
Year yyyy
Month MM
Day dd
Hour hh
Minute mm
Second ss
Millisecond SSS
Reference Tables
You can add a reference table to a condition or an action. Add a reference table to a condition to verify that
the input data contains the data values that you expect. Add a reference table to an action to return a value
from the table that corresponds to the input data value.
A reference table contains the standard versions of a set of business values. A reference table might contain
public terms, such as telephone area codes or address abbreviations. Or, a reference table might contain
values that are specific to an organization, such as employee codes or product codes. You can create
reference tables in the Analyst tool, or you can ask a developer to create a reference table. You select a
reference table from a project in the Model repository when you configure the condition or the action.
A reference table contains two or more columns. Each row in the table represents a single business value. A
row might contain two or more identical values, or it might contain alternative versions of the same value,
including incorrect values.
If you add the reference table to a condition, the condition compares the input data to the values in the first
column in the reference table. If the condition finds an input value in the reference data, the condition applies
the operator to the input data to determine the action to take.
Name1 Name2
Mumbai Bombay
Chennai Madras
Bengaluru Bangalore
Puducherry Pondicherry
Kadapa Cuddapah
Kochi Cochin
Kolkata Calcutta
The Name1 column contains the current names of cities in India. The Name2 column contains the previous
version of each name. Add the reference table to a condition to verify that the input data contains the current
city names. Add the reference table to an action to find the older city names and replace them with the
current city names.
Add Condition
Add a condition to the current rule statement. When you configure multiple conditions in a rule
statement, you create an AND relationship between the conditions.
Add a rule statement to the rule set below the current rule statement. The rule statement that you add
uses the output from the current rule statement as an input.
Copy the current rule statement. You can paste the rule statement to the current rule set or to another
rule set.
Remove the current rule statement from the rule set. You can paste the rule statement to another rule
set.
Move Down
Reorder the rule statements so that the current rule statement changes places with the rule statement
below it.
Move to Bottom
Move the current rule statement to the bottom of the rule set.
Move to Top
Move the current rule statement to the top of the rule set.
Move Up
Reorder the rule statements so that the current rule statement changes places with the rule statement
above it.
Note: Data passes through a chain of rule statements when all of the logical operations in the statements are
valid for the inputs that you select. If a rule statement in the chain does not generate a result for a data row,
the chain performs no further analysis on the row.
Configuring a Rule Statement that Reads the Result of Another Rule Statement 39
Cut, Copy, and Paste Operations on Rule Statements
Copy a rule statement to reuse the rule statement logic in the same rule set or in another rule set. Move a rule
statement that belongs in another rule set. You can copy or move a rule statement to a rule set in the same
rule specification or in another rule specification.
You might copy a rule statement to another rule specification to reuse the rule statement. You might copy a
rule statement within a rule specification to create a similar rule statement.
You might move a rule statement when you determine that the rule statement applies to a different business
rule requirement.
When you copy or move a rule statement to another rule specification, you also copy the inputs that the rule
statement uses.
Move a rule statement when you determine that the rule statement belongs in another rule set.
Move a rule specification when you determine that the rule set belongs in another location.
You can use rule statements to verify and update the following business facts:
Use the rule statement to verify that the business data is accurate. For example, define a rule statement
to verify that a product description table uses the current product codes.
Define a rule statement to find values that are no longer valid or relevant to the business.
Use the rule statement to return a user-defined value that identifies any row that contains an obsolete
term.
42
Standardize business data values
Define a rule statement that searches for values that you specify and replaces them with other values.
Use the rule statement to verify that the business data follows a standard format. For example, define a
rule statement to verify that financial data does not use currency symbols. The rule statement replaces
the currency symbols with agreed abbreviations for the currency names.
Define a rule statement that removes redundant characters and redundant strings.
Use the rule statement to ensure that users and software applications can read the business data
correctly. For example, define a rule statement to delete character spaces at the start and end of a data
field.
Define a rule statement that correlates information from different inputs. Use different conditions to
analyze the inputs, and connect the conditions with AND logic. For example, define conditions to link
different facts about customers and to derive information that can improve customer service.
Define a rule statement that verifies that the business follows a stated policy.
Use the rule statement to define a function expression that represents the policy.
Define a rule statement that adds characters to data values so that the values meet the current business
standards.
Use the rule statement to define an expression that updates the values.
Define a rule statement that adds the current date and time to a data set.
Use the rule statement to add a time stamp to the data set that indicates when the mapping ran.
Define a rule statement that applies an address validation mapplet to the input data. Define another rule
statement that evaluates the output from the address validation mapplet.
Define a rule statement that looks for the values that you enter in a column of data.
Use the rule statement to define a list of data values when the Model repository does not contain a
reference table of the values.
Define a rule statement that finds a data value or a character string in fields that contain multiple values
or longer character strings.
Use the rule statement to find data values that contain similar information.
If the rule statement finds an obsolete branch code in the input data, it writes a value that you specify as
output. If the rule statement does not find an obsolete branch code, the action writes the input value as
output. The action writes an output for each input row that satisfies the condition in the rule statement.
To standardize multiple values, you can create additional rule statements. Alternatively, use a reference table
that identifies the values.
Configure a rule statement that deletes the redundant spaces. To delete longer character strings, create a
rule statement that uses the "Replace Character" function.
For example, you might configure a rule statement for a financial institution to identify customers who hold
credit balances. You might also configure a rule statement to identify customers who earn a high salary.
For example, you might configure a rule statement that validates mortgage loan applications for a mortgage
broker. The mortgage broker refuses any loan application that requires the applicant to repay more than
twenty-five percent of their salary each month. The rule statement tests the monthly repayment amount
against an expression that calculates the salary percentage.
For example, you might configure a rule statement that updates a column of product codes. The product
owners decide to append a date prefix to the current codes. The rule statement uses an expression to update
the codes.
For example, you might define a business rule that states that primary key columns in a data set cannot
contain null values. You define a parallel business rule that sets a monthly schedule to review the primary key
Add a condition for each primary key column. Use the AND feature to combine the conditions.
For example, you might select a mapplet that returns a delivery status code for each address in a data set.
Configure a condition to verify that the address data column is not null. Configure an action to apply the
mapplet to the data. Configure an additional rule statement to evaluate the status codes that the mapplet
generates.
• The business rule requirement that the condition represents applies to multiple values.
• The organization does not maintain a reference table of the values.
For example, you might work for a manufacturing company that must recall a small number of products
because of a product defect. You know the serial numbers of the products that you must recall. You
configure a rule statement with an input that represents the column of serial number data. You add the list of
serial numbers to recall to the rule statement condition.
For example, you might work for an organization that stores inventory items in a warehouse. The organization
must manage the warehouse space and ensure that inventory items stay in the warehouse for as little time
as possible. You want to measure the number of items in inventory for a range of products. You configure a
single condition to identify the products in a product table. The product names are West Wood, West Star,
and West Land. You design a condition to find product names that contain the string "West."
The rule statement that you configure might represent a single element in a business rule. For example, the
business rule might describe a policy to reduce the sale price of products that spend a long time in inventory.
The current rule statement generates an output that a rule statement in a parent rule set can read as an input.
Test the rule specification to verify that the output satisfies the business rule requirements. To test a rule
specification or a rule set, you enter sample values in one or more data columns. Use the Test options on the
rule specification properties to display the columns. You can cut, copy, and paste test data within the test
area and between rule sets in the rule specification. If you open more than one rule specification in
concurrent browser tabs, you can cut, copy, and paste test data between the rule specifications.
You can test a complete rule specification, and you can test each rule set in the rule specification. If a rule
specification is not valid, test the rule sets to find and fix the validation error.
Consider the following rules and guidelines when you validate a rule specification:
• The Analyst tool validates the lowest rule sets in the rule specification first. If the Analyst tool finds an
error in a rule set, the Analyst tool stops validation and reports the error.
• The Analyst tool reports one error at a time. When you repair a validation error, validate the rule
specification again.
55
• A rule specification can fail validation for the following reasons:
- A condition or an action in a rule statement specifies a data type that differs from the input data type.
- The rule statements in a rule set generate output data values of different data types.
- A parent rule set does not read an output from a child rule set.
To verify the full operation of the rule specification, select the top-level rule shape and test the rule
specification.
A G
Analyst Service generating rules
mapplets 11 rules and guidelines 19
steps to generate rules 19
B
business rules
I
facts 21 inputs
data types 10
C
conditions
M
Define Action dialog box 33 Manage Global Inputs dialog box 18
Define Condition dialog box 29 mappings
copy and paste operations Data Integration Service 11
rule sets 25 mapplets
rule statements 40 adding to a rule statement 50
Analyst Service 11
Data Integration Service 11
F R
facts in business data 21 rule sets
function expressions adding a rule set to a rule specification 25
Add to Date 34 configuration 21
Choose 34 configuration rules and guidelines 21
Concatenate 34 copy and paste operations 25
Date Difference 34 inputs 10
Date Part 34 properties 24
Date Time 34 testing a rule set 57
Greatest 34 rule specifications
Last Day 34 collaborating with developers 11
Least 34 configuration prerequisites 14
Length 34 configuring a rule specification 17
Lower 34 general properties 16
Null 34 generating a mapplet from a rule specification 19
Replace Character 34 inputs 10
Replace String 34 mapplets and mappings 11
Reverse 34 Model repository 11
Truncate 34 push down to hadoop 11
Upper 34 rule sets 10, 21
functions rule statements 10, 27
defining a range of values 50 rules and guidelines for mapplets and rules 11
terminology 11
58
rule specifications (continued) rule statements (continued)
testing a rule specification 56 searching a list of values 52
verify business data properties 15 standardizing data 45
verify business rule requirements 15 steps to configure 38
version control 12 verify data against business regulations 48
rule statements verifying data accuracy 44
actions 10, 31 rules
add rule statement using result 39, 50 synonym for mapplets 11
AND relationships 47
conditions 10, 28
configuration 27
copy and paste operations 40
T
current date analysis 28 transformations 11
default rule statement 10
defining a range of values 50
discovering business information 47
function expression descriptions 34
V
improving data usability 46 version control
List of Values function 23 generating mapplets 19
menu options 37 rule specifications 12
null value analysis 28
operators 10, 30
Index 59