%BRM_IMPORT_RULE_FLOW

Imports rule flows from the specified CSV file into the SAS Decision Manager database.

Requirement: This macro must be run on the server tier.

Syntax

%BRM_IMPORT_RULE_FLOW (CSV=%STR(input_filename.CSV),
REJECT=%STR(reject_filename.CSV)<, BRM_USER=user_ID>)<, OVERWRITE=Y|N>;

Required Arguments

CSV=%STR(input_filename

specifies the full pathname to the CSV file where you want to import the data from. For more information, see Format of the Rule Flow CSV Input File.

REJECT=%STR(reject_filename)

specifies the full pathname to the CSV file where you want the macro to write any records that were not imported to the SAS Decision Manager database. See Using the %BRM_IMPORT_RULE_FLOW Macro for more information.

Optional Arguments

BRM_USER=user_ID

specifies the user ID that you want to be associated with the data that is imported. This user ID is associated with the imported objects in the SAS Decision Manager database and is displayed in the interface.

Default User ID of the user that is logged on to the server and running the macro

OVERWRITE=Y|N

specifies whether existing rule flows can be updated. If you specify N, the updates are rejected.

Details

Using the %BRM_IMPORT_RULE_FLOW Macro

The %BRM_IMPORT_RULE_FLOW macro enables you to add new rule flows and to update existing rule flows. The macro uses the rule flow name and pathname to determine whether a rule flow already exists. If the rule flow name and pathname already exist, then the rule flow is updated (unless OVERWRITE=N is specified when the macro is invoked). If the rule flow pathname exists but the rule flow name does not exist, the rule flow is created. If the rule flow pathname does not exist, then the rule flow is rejected.
The %BRM_IMPORT_RULE_FLOW macro runs several validation checks as it imports the rule flows. For example, it checks whether a rule set is referenced in a given rule flow more than once and whether section codes are correct. If the macro finds a validation error in a rule flow, it writes a message to the SAS log, and the rule flow is rejected. The macro writes the input records for the rejected rule flow to the CSV file that was specified in the REJECT= option.

Format of the Rule Flow CSV Input File

Each row of the CSV input file identifies a rule set, and a rule flow provides the information about how that rule set fits into the rule flow. The CSV file must contain all of the columns that are listed in the following table, in the order listed. You must specify values for all columns, except as noted in the table. To create a blank column in the CSV file, specify two comma separators without any content between them.
For example, to add a rule set to position 1 in the main section of the rule flow named assignRisk in the Retail/Loans folder, you can specify the following in the CSV file:
.,assignRisk,,Y,main,Y,Loans/Retail,RuleSet1,Loans/Retail,Loan_Vocab,,1
Format of the Rule Flow CSV Input File
Column
Description
Can Column Be Blank
RULE_FLOW_SK
The identification number of the rule flow.
Yes
RULE_FLOW_NM
The name of the rule flow where you want to add the rule set that is specified in RULE_SET_NM.
No
RULE_FLOW_SHORT_DESC
The description of the rule flow.
Yes
RULE_FIRED_OUTPUT_FLG
Specifies whether to create output only for records that fire rules. Specify Y or N. For some types of applications, only the output records for which at least one rule has fired are of interest. Limiting output is useful for applications that detect outliers, such as applications that detect fraud.
No
RULE_SET_SECTION_CODE
The section of the rule flow to which the rule set that is specified in RULE_SET_NM belongs. Specify init, groupstart, main, groupend, or final.
The codes groupstart and groupend are valid only if you also specify at least one term for BY_TERM. See Simple Rule Flows, Complex Rule Flows, and BY Groups in SAS Decision Manager: User’s Guide for more information.
No
INCLUDE_NODE_OBJECT_FLG
Specifies whether the rule set specified in the RULE_SET_NM field is run when the rule flow executes. Specify Y or N. Selectively running certain rule sets is useful during rule flow development and testing.
No
RULE_FLOW_PATH
The pathname to the business rules folder for the rule flow. This pathname must exist. Separate folder names with forward slashes.
No
RULE_SET_NM
The name of the rule set to be added to the rule flow. A rule set can be added to the same rule flow only once.
No
RULE_SET_PATH
The pathname to the business rules folder for the rule set that is specified by RULE_SET_NM. The rule set must exist at the specified location. Separate folder names with forward slashes.
No
VOCAB_NM
The name of the vocabulary that the rule set uses. All rule sets in the same rule flow must use the same vocabulary.
No
BY_TERM
The list of BY-group terms that the rule set uses. Separate multiple BY-group terms with commas.
The BY-group terms must be the same for all rule sets that are in the same rule flow. All of the BY-group terms must belong to the same vocabulary.
See Simple Rule Flows, Complex Rule Flows, and BY Groups in SAS Decision Manager: User’s Guide for more information.
Yes
ORDER
The order number for the rule set that is in the rule flow. Order numbers must start with 1 and be continuous through the entire rule flow. Do not restart order numbers at section boundaries.
No
Last updated: February 22, 2017