Create Rule

You can create rule definitions using the existing metadata objects. The Write role should be mapped to your user group, from the User Group Role Map window.
To create a Rule definition:
  1. Click New button from the toolbar in the Rule window. The Rule Definition (New Mode) window is displayed.

    Figure 10-2 Rule Definition (New Mode) window


    This image displays the Rule Definition (New Mode) window.

  2. From the Linked to pane, click in the Folder field. The Folder Selector dialog is displayed. The folders that are mapped to your user group are displayed.
    1. Select the checkbox adjacent to the required folder. Click OK.
    2. Click New from the List toolbar to create a new folder/segment. For more information, see Segment Maintenance.
    3. To search for a folder, specify any keyword and click the Search button.
  3. From the Linked to pane, click in the Dataset field. The Dataset Selector dialog is displayed with the list of datasets available under the selected information domain.
    1. Select the checkbox adjacent to the required Dataset name and click OK.
    2. To search for a particular dataset, specify any keyword and click Search button.
    3. To view the properties of the selected Dataset, click the Dataset icon.
  4. Enter the details in the Master information pane as tabulated.

    Table 10-2 Field Names in the Master Information pane and their Descriptions

    Field Name Description
    ID The ID will be automatically generated once you create the rule.
    Code Enter a valid code for the rule. Ensure that the rule code is alphanumeric with a maximum of 30 characters in length and there are no special characters except underscore “_”.
    Name Enter a valid name for the rule. Ensure that Rule Name is alphanumeric and does not contain any of the following special characters: #, %, &, +, ", and ~.
    Version By default, the version field is displayed as <<NA>> for the new rule being created. Once the rule definition is saved, an appropriate version is assigned as either -1 or 0 depending on the authorization permissions. For more information, see Rule Definition Versioning.
    Active By default, the Active field is displayed as <<NA>> for the new rule being created. Once the rule definition is saved, the status is set to Yes if you are an Authorizer creating the rule or No if the created rule needs to be authorized by an Authorizer.
    Type Select the Type based on which you want to create the rule from the drop-down list. The options are Computation and Classification.
  5. Click in the Master information pane to edit the properties of the Rule definition. The Properties window is displayed.

    Figure 10-3 Properties window


    This image displays the Properties window.

    Data in the Query Optimization Settings pane are derived from the global properties (if defined) in the Optimization tab of System Configuration > Configuration window. However, some options defined in Global Preferences precede the Rule level properties that you define here.
    The following table describes the fields in the Query Optimization Settings pane.

    Table 10-3 Field Names Query Optimization Settings pane and their Descriptions

    Field Name Description
    Properties
    Effective Start Date, Effective End Date Effective Dating is not implemented for Rule definition.
    Last operation type By default, this field displays the last change done to the Rule definition. While creating a Rule, this field displays the operation type as Created.
    Pre processing
    Pre Built Flag

    This field refers to the pre-compiled rules that are executed with the query stored in the database. While defining a rule, you can make use of the Pre Built Flag to fasten the rule execution process by making use of existing technical metadata details wherein the rule query is not rebuilt again during Rule execution.

    Select the required option from the drop-down list.

    By default, Pre Built Flag status is set to No. This indicates that the query statement is formed dynamically retrieving the technical metadata details.

    If the Pre Built Flag status is set to Yes, then the relevant metadata details required to form the rule query are stored in the database on saving the rule definition. When this rule is executed, the database is accessed to form the rule query based on stored metadata details, thus ensuring performance enhancement during rule execution. For more information, see Significance of Pre-Built Flag.

    Query Optimization Settings
    Merge Hints

    Specify the SQL Hint that can be used to optimize Merge Query.

    For example, “/*+ ALL_ROWS */”

    In a Rule Execution, Merge Query formed using definition level Merge Hint precede over the Global Merge Hint Parameters defined in the Optimization tab of System Configuration > Configuration window. In case, the definition level Merge Hint is empty/ null, Global Merge Hint (if defined) is included in the query.

    Select Hints

    Specify the SQL Hint that can be used to optimize Merge Query by selecting the specified query.

    For example, “SELECT /*+ IS_PARALLEL */”

    In a Rule Execution, Merge Query formed using definition level Select Hint precede over the Global Select Hint Parameters defined in the Optimization tab of System Configuration > Configuration window. In case, the definition level Select Hint is empty/null, Global Select Hint (if defined) is included in the query.

    Pre Script

    Refers to a set of semicolon (;) separated statements that need to be executed before Merge Query on the same connection object.

    During Rule Execution, Global Pre Script Parameters (defined in the Optimization tab of the Configuration window) are added to a Batch followed by Rule definition level Pre Script statements, if the same has been provided during rule definition. However, it is not mandatory to have a Pre Script either at Global or definition level.

    Post Script

    Refers to a set of semicolon (;) separated statements that are to be executed after Merge Query on the same connection object.

    During the Rule Execution, Global Post Script Parameters (defined in the Optimization tab of the Configuration window) are added to a Batch followed by Rule definition level Post Script statements, if the same has been provided during rule definition. However, it is not mandatory to have a Post Script either at Global or definition level.

    Use ROWID

    You can select the ROWID checkbox to create a Merge Statement based on ROWID instead of Primary Keys.

    During Rule Execution, ROWID is considered while creating Merge Statement if Use ROWID checkbox is selected in either Global Parameters (Configuration window) or Rule definition properties.

    If Use ROWID checkbox is not selected in either Global Parameters (defined in the Optimization tab of the Configuration window) or Rule definition properties, then the flag is set to “N” and Primary Keys are considered while creating in Merge Statements.

  6. Click OK. The properties are saved for the current Rule definition.