Target Design
Use Target Rules
Refer to Data Services AutoGen for more information.
There are two types of Target rules that can be assigned to Target fields:
-
Complex rules allow a user to document rules. These rules may not have been written yet, or may have been written and saved in a data source. The documentation associated with a Complex rule can contain the rule type (such as stored procedures, BODS functions, or SQL functions), a rule description, and a rule definition. Refer to Add a Complex Rule for more information.
NOTE:Complex rules are for documentation purposes only and provide information that the Data Services developer uses when writing the rule. When an AutoGen request is processed, a placeholder where Complex rules can be developed is created. Complex rules are not overwritten in Data Services.
-
Basic rules are logic conditions associated with a Target field that are used in Data Services AutoGen. They can be used to apply conditions based on up to three combined fields. When Data Services AutoGen runs, the Basic rules are added to the job in the enrichment data flow based on the priority set in Target Design. Basic rules are overwritten using the rule definition from Target Design each time Data Services Jobs are automatically generated. Refer to Add a Basic Rule for more information.
NOTE: If a rule is set in Target Design, that rule is owned by Target Design. When the rule is pushed to Map, a note attached to the mapping record indicates that the rule has already been set in Target Design and cannot be updated in Map.
Add a Basic Rule to a Target Field
A Basic rule allows a user to create a simple conditional or default rule (one that populates the field with a default value).
Refer to Data Services AutoGen for more information.
When a Basic rule is added at the target-field level, the user selects the rule to apply to the selected field.
NOTE: Use single quotes (‘) around strings when entering values.
To add a Basic rule to a target field in Target Design:
- Select Design in the Navigation pane.
- Click the Targetsicon on the Design page.
- Select the Fields icon for a Target.
-
Click the Basic Rules icon for a field.
- If no records exist, the page displays in add mode. Otherwise, click Add.
-
Enter a value in the PRIORITY field.
NOTE: This is the order that the Basic rule will be added to the enrichment data flow when the rule is autogenerated during Data Services AutoGen if multiple rules are added for the field. This number must be unique.
- Enter a descriptive rule name in the NAME field.
- Click Save; the Vertical View displays.
-
Enter a value in the Field Value field.
NOTE: This is the value that the field will be set to if the rule condition(s) is met.
NOTE: Use single quotes (‘) around strings.
-
Enable the Is Null Condition check box if needed.
NOTE: If enabled, if the value in the target field is NULL, the field will be populated with the value in the Field Value field. The Is Null Condition works in conjunction with any other rule condition added for the target field.
-
Select a field name in the Rule Field1 list box.
NOTE: The values stored in this field in the target are evaluated using the value entered in the Rule Field1Value field. Each field can only be used in one condition per rule.
-
Enter the value that will cause the Field Value field to be set for the field in the RuleField1Value field.
NOTE: Up to three conditions can be added.
NOTE: Use single quotes (‘) around strings.
- Click Save.
For example, a user sets a Basic rule for the PSTAT field (Maintenance Status) on the ttMARA table by completing the fields on the Rules: Basic Rule page's Vertical View with these values.
Field |
Value |
Field Value |
1 |
Rule Field1 |
MTART |
Rule Field1 Value |
FERT |
This rule states that if the MTART field (Material Type) on the ttMARA table has a value of FERT (Finished Goods), the rule condition is met, and the PSTAT field for that record will be set to 1.