Rule specification assets > Rule statement configuration > Conditions
  

Conditions

A condition is a data operation that a rule statement specifies for one or more input data values. 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. The action represents a potential output from the rule set. If a condition cannot validate an input data value, the rule specification does not perform the action.
Configure a condition to perform one of the following types of analysis:
Compare the input data values to a single value
The rule statement compares the values in the input column to the value that you enter.
Compare the input data values to the values on another input
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.
Search for null values
The rule statement searches the input column for null or empty strings.
Compare the input data values to a range of values
The rule statement compares the values in the input column to a range of values that you enter.
Compare the input data values to the values in a dictionary
The rule statement compares the values in the input column to the values in a dictionary. The rule statement returns a value from the dictionary or a value that you enter.
Compare the input data values to the output from another rule specification
The rule statement compares the values in the input column to the output from a rule specification that you select. The rule specification runs within the rule statement logic.
Specify at least one input for the rule specification. You can select any input available to the current rule specification, including the current condition input, or you can enter a value as a rule specification input. You also select the field that the condition reads as the rule specification output.
Compare the input data values to the output from a mapplet
The rule statement compares the values in the input column to the output from a mapplet that you select. The mapplet runs within the rule statement logic.
Specify at least one input for the mapplet. You can select any input available to the current rule specification, including the current condition input, or you can enter a value as a mapplet input. You also select the field that the condition reads as the mapplet output.
Note: A rule specification can read mapplets that contain passive transformations.
Apply a function expression to the input data values
The rule statement applies a function expression that you select to the values in one or more input columns.
Apply a custom expression to the input data values
The rule statement applies a custom expression that you define to the values in one or more input columns.

Rules and guidelines for mapplets in conditions and actions

You can optionally add a mapplet to a function in a rule statement condition or action. When you add a mapplet, you add the logic of any asset or transformation in the mapplet to the condition or action.
The mapplet can contain any passive data quality transformation and can additionally contain a passive Java transformation and Expression transformation.
Consider the following rules and guidelines when you add a mapplet to a condition or action:

Passive transformations

You can use the following transformations in a mapplet that you add to a condition or action:
Note: Do not define an in-out parameter on a mapplet that you add to a condition or action. Before you add a mapplet with a Java transformation to a condition or action, compile the transformation in Data Integration.
For information about how to use a Java transformation that consumes external Java packages in a mapplet, see the Knowledge Base article KB 000227229.

Nested mapplets

You can configure a condition or action with up to four nested mapplets and rule specification assets in an alternating manner.
Consider the following example:
In this way, you can create four levels of mapplets and rule specifications beneath a condition or action.

Function configuration in conditions

You can configure the data operation in a condition as a function expression. You can also select a function expression from a list of expressions in the rule specification. Use the function options in the condition to configure or select the expression.
You can use the function options as an alternative to the inline condition options that the rule statement displays in the workspace. You can configure a function to read multiple inputs. You can also use the function options to add a dictionary or another rule specification to the condition.
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. The function expressions that you can use depend on the operator that you select.
The following image shows the options on the Define Condition dialog box for different operators:
The dialog box shows the types of condition that you can perform in the left-hand pane. You select the type of condition, and you configure the condition in the right-hand pane.
The dialog box contains the following options:
  1. 1Input
  2. Use the Input options to compare an input data value to other data values in the following ways:
    Select the Inputs option with the following operators: is, is not, is greater than, is greater than or equal to, is less than, is less than or equal to, is within, and is not within.
  3. 2Dictionary
  4. Use the Dictionary options to compare an input data value with the values in a dictionary.
    Select the Dictionary option with the following operators: is within and is not within.
  5. 3Functions
  6. Use the Functions options to apply an expression to the input data. Select an expression from the list in the dialog box.
    Select the Functions option with the following operators: is, is not, is greater than, is greater than or equal to, is less than and is less than or equal to.
  7. 4Rules
  8. Use the Rules options to compare an input data value to the output from another rule specification. The rule specification that you select runs as part of the rule statement at run time.
    Select the Rules option with the following operators: is, is not, is greater than, is greater than or equal to, is less than and is less than or equal to.
  9. 5Mapplets
  10. Use the Mapplets options to compare an input data value to the output from mapplet. The mapplet runs as part of the rule statement at run time.
    Select the Mapplets option with the following operators: is, is not, is greater than, is greater than or equal to, is less than and is less than or equal to.
    For more information on mapplet configuration, see Mapplet configuration options.
  11. 6Expressions
  12. Use the Expressions options to define and apply a custom expression to the input data. You can enter an expression as text, or you can select from a range of built-in expressions.
    Select the Expressions option with the following operators: is, is not, is greater than, is greater than or equal to, is less than and is less than or equal to.
  13. 7Search
  14. 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.
    Select the Search option with the contains operator.