Creating Conditional Transformation Rules
Transformation rules are grouped according to the conditions that apply. The default condition is Always, meaning a transformation rule is applied to every record. When there is more than one rule associated with a condition, the rules are applied in the order they are listed in the rules pane of the Transformer Configuration window.
► To create a condition
|
1.
|
From the Navigation or Project View, right-click the Transformer process and select Edit Process. You can also double-click the process to open it for editing. |
|
2.
|
Select the Input Conditionals tab for the input data transformation. Select the Output Conditionals tab for the output data transformation. Conditions are displayed in the left-hand pane. Click to display its associated transformation rules in the right-hand pane. |
Example
This example shows that two attribute scan rules, one is to delete spaces and the other is to delete hyphens, will always run in this order.
|
3.
|
Right-click and select Insert > Condition Before/After.... |
|
Note:
|
If you leave the condition blank, it will be set to Always. |
► To modify a condition
|
1.
|
Right-click and select an option. |
|
■
|
Edit.... Change the selected condition. |
|
■
|
Move Up/Down and Move To Top/Bottom. Move the selected condition to change it's execution order. |
|
■
|
Insert > Sub-condition.... Create sub-conditions (nested IF/Else clauses). The sub-condition is displayed in the conditions pane in a tree view. It is also displayed in the rules pane as a condition. |
|
Note:
|
If you delete the condition in the Edit Condition window and leave it blank, it will be set to Always. |
Example 1
In this example, the condition [Sequence Number] >= 100 includes a sub-condition, [Source Id p1] = "ACE." "Delete spaces in the account number" and "Delete hyphens in the tel number" will be processed if the [Sequence Number] >= 100 is met. If the records meet [Sequence Number] >= 100 and the sub-condition, [Source Id p1] = "ACE" then the rules set under the sub-condition will be processed.
Example 2
In this example, three conditions including sub-conditions are specified. The Transformer will process each condition and its transformation rules from top to bottom. The highlighted condition, [Line 01] = tcase("John Smith"), will run at the end and applied to the attribute scan rule to remove "John Smith."
► To delete a condition
|
1.
|
Right-click . |
|
2.
|
Select Delete. When you delete a condition, all transformation rules associated with the condition will also be deleted.
|
Related Topics