SAS Documentation
SASĀ® Solution for Stress Testing
Reference manual - version 08.2021
Loading...
Searching...
No Matches
rule_set_config.sas
Go to the documentation of this file.
1/* Copyright (C) 2018 SAS Institute Inc. Cary, NC, USA */
2
3/*!
4\file
5\brief The table RULE_SET_CONFIG contains business rules definitions.
6
7 | PK | Variable | Type | Required? | Label | Description |
8 |--------------|---------------------|------------------|------------|----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
9 | ![ ](pk.jpg) | RULE_SET_GROUP_ID | VARCHAR(100) | Y | Rule Set Group Id | Rule Set Group Identifier |
10 | | PRIMARY_KEY | VARCHAR(10000) | N | Primary Key | (Optional) List of primary key variables of the source table. Only used if parameter <i>DS_OUT_DETAILS</i> is not blank |
11 | | RULE_ID | VARCHAR(32) | Y | Rule Id | Rule Identifier |
12 | | RULE_NAME | VARCHAR(100) | N | Rule Name | Rule Name |
13 | | RULE_DESC | VARCHAR(100) | N | Rule Description | Rule Description |
14 | | RULE_COMPONENT | VARCHAR(10) | Y | Rule Component | Specifes if the current record relates to the Condition or the Action portion of the rule. <br>Valid Values (case insensitive):<br> - Condition <br> - Action |
15 | | OPERATOR | VARCHAR(10) | N | Operator | Boolean Operator. It can be used to combine multiple conditions within a rule.<br>Valid Values (case insensitive): <br> - <blank> <br> - And <br> - Or <br> -Not <br> -And Not <br> -Or Not |
16 | | PARENTHESIS | VARCHAR(1) | N | Parenthesis | Opening/Closing parenthesis. It can be used to create more complex boolean conditions.<br>Valid Values: <br> - <blank> <br> - ( <br> - ) |
17 | | COLUMN_NM | VARCHAR(32) | Y | Column Name | Required unless RULE_TYPE = "CUSTOM". Name of the variable used to build the condition expression |
18 | | RULE_TYPE | VARCHAR(100) | Y | Rule Type | Controls how the expression for evaluating the condition/action is built. |
19 | | RULE_DETAILS | VARCHAR(4000) | Y | Rule Details | Provides additional details needed to build the expression for evaluating the condition/action. |
20 | | MESSAGE_TXT | VARCHAR(4096) | N | Message Text | Provides a custom message for reporting the results of rules evaluation. Only one message per rule can be specified: for any given rule id, the first non-blank value that is used. |
21 | | LOOKUP_SCHEMA_NAME | CHARACTER(100) | N | Lookup Schema Name | Required if this rule uses a lookup table. Used to specify the schema name of the data definition for this lookup table. |
22 | | LOOKUP_SCHEMA_VERSION | CHARACTER(100) | N | Lookup Schema Version | Required if this rule uses a lookup table. Used to specify the schema version of the data definition for this lookup table. |
23 | | LOOKUP_TABLE_PRIMARY_KEY | CHARACTER(1) | N | Lookup Key Source | Used if this rule has a lookup table. If set to Y then only primary key variables from the lookup table are available for LOOKUP_KEY. If set to N then all variables from the lookup table are available for LOOKUP_KEY |
24 | | LOOKUP_KEY | VARCHAR(10000) | N | Lookup key | Space separated list of lookup key variables. These variables must be found in both the SOURCE_TABLE and the LOOKUP table |
25 | | LOOKUP_DATA | VARCHAR(10000) | N | Lookup Data | Space separated list of lookup data variables to retrieve. These variables must be found in the LOOKUP table |
26 | | AGGR_VAR_NM | VARCHAR(32) | N | Aggregated Variable Name | Name (Alias) given to the result of the aggregated expression |
27 | | AGGR_EXPRESSION_TXT | VARCHAR(10000) | N | Aggregated Expression Text | Summary-type of expression (i.e. SUM(<varname>). <br>Orthogonal query expressions can be used to perform filtered aggregation (i.e. SUM(<varname> * (<other_varname> = "some value")) |
28 | | AGGR_GROUP_BY_VARS | VARCHAR(10000) | N | Aggregated Group By Vars | (Optional) Space separated list of group-by variables for the aggregation. |
29 | | AGGREGATED_RULE_FLG | VARCHAR(1) | Y | Aggregated Rule Flag | Flag (Y/N). Specifies if the rule operates at the detail level (for each record of the SOURCE_TABLE) or at aggregated level |
30 | | RULE_REPORTING_LEV1 | VARCHAR(1024) | N | Rule Reporting Level 1 | This field is used to classify rules for reporting purpose |
31 | | RULE_REPORTING_LEV2 | VARCHAR(1024) | N | Rule Reporting Level 2 | This field is used to classify rules for reporting purpose |
32 | | RULE_REPORTING_LEV3 | VARCHAR(1024) | N | Rule Reporting Level 3 | This field is used to classify rules for reporting purpose |
33 | | RULE_WEIGHT | NUMERIC(8) | Y | Rule Weight | A weight assigned to the rule. Used for reporting purpose (weighted aggregation for building performance indicators) |
34
35\details
36
37 See \link irm_run_rules.sas \endlink for details for details.
38
39\ingroup ddlStaticDQ
40\author SAS Institute Inc.
41\date 2018
42*/
43
44CREATE TABLE &LIBREF..RULE_SET_CONFIG (
45 RULE_SET_GROUP_ID VARCHAR(100) label = 'Rule Set Group Id',
46 PRIMARY_KEY VARCHAR(10000) label = 'Primary Key',
47 RULE_ID VARCHAR(32) label = 'Rule Id',
48 RULE_NAME VARCHAR(100) label = 'Rule Name',
49 RULE_DESC VARCHAR(100) label = 'Rule Description',
50 RULE_COMPONENT VARCHAR(10) label = 'Rule Component',
51 OPERATOR VARCHAR(10) label = 'Operator',
52 PARENTHESIS VARCHAR(1) label = 'Parenthesis',
53 COLUMN_NM VARCHAR(32) label = 'Column Name',
54 RULE_TYPE VARCHAR(100) label = 'Rule Type',
55 RULE_DETAILS VARCHAR(4000) label = 'Rule Details',
56 MESSAGE_TXT VARCHAR(4096) label = 'Message Text',
57 LOOKUP_SCHEMA_NAME VARCHAR(100) label = 'Lookup Schema Name',
58 LOOKUP_SCHEMA_VERSION VARCHAR(100) label = 'Lookup Schema Version',
59 LOOKUP_TABLE_PRIMARY_KEY VARCHAR(1) label = 'Lookup Key Source',
60 LOOKUP_KEY VARCHAR(10000) label = 'Lookup key',
61 LOOKUP_DATA VARCHAR(10000) label = 'Lookup Data',
62 AGGR_VAR_NM VARCHAR(32) label = 'Aggregated Variable Name',
63 AGGR_EXPRESSION_TXT VARCHAR(10000) label = 'Aggregated Expression Text',
64 AGGR_GROUP_BY_VARS VARCHAR(10000) label = 'Aggregated Group By Vars',
65 AGGREGATED_RULE_FLG VARCHAR(1) label = 'Aggregated Rule Flag',
66 RULE_REPORTING_LEV1 VARCHAR(1024) label = 'Rule Reporting Level 1',
67 RULE_REPORTING_LEV2 VARCHAR(1024) label = 'Rule Reporting Level 2',
68 RULE_REPORTING_LEV3 VARCHAR(1024) label = 'Rule Reporting Level 3',
69 RULE_WEIGHT NUMERIC(8) label = 'Rule Weight'
70);