%BRM_IMPORT_VOCABULARY

Imports vocabulary terms from the specified CSV file into the rules database.

Restrictions: This macro must be run on the server tier.
The same user can run any of import macros at the same time. However, the same import macro cannot be run simultaneously by different users.

Syntax

%BRM_IMPORT_VOCABULARY (CSV=input_filename.CSV,
REJECT=reject_filename.CSV<, options>);

Required Arguments

CSV=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 Vocabulary CSV Input File.

REJECT=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 rules database. See Using the %BRM_IMPORT_VOCABULARY 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 rules database and is displayed in the SAS Decision Manager interface.

Default User ID of the user that is running the macro

BYPASSLOCK=Y|N

enables you to override the lock that another user has on the importing process. See Using the %BRM_IMPORT_VOCABULARY Macro for more information.

Default N

Details

Using the %BRM_IMPORT_VOCABULARY Macro

The %BRM_IMPORT_VOCABULARY macro enables you to add new vocabulary terms. You cannot use the macro to update existing terms.
The %BRM_IMPORT_VOCABULARY macro runs several validation checks as it imports the vocabulary terms. For example, it verifies that term, entity, and vocabulary names are valid, and ensures that a term is not duplicated in a vocabulary. If the macro finds a validation error, it writes a message to the SAS log, and the term is rejected. The macro writes the input records for the rejected term to the CSV file that was specified in the REJECT= option.
When you run the %BRM_IMPORT_VOCABULARY macro, it creates a lock table in the rules database named lock_import_vocabulary. The SAS log states which user holds the lock and the time at which the lock started. It is possible for this lock to remain in place after the macro has finished. If this happens, you can override the lock by specifying the BYPASSLOCK=Y option when you run the macro.

Format of the Vocabulary CSV Input File

Each row of the CSV input file defines a term, including the term data type, domain type, and the entity and vocabulary that contains the term. The CSV file must contain all of the columns 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 term to the entity named Customer in the vocabulary named loanVocab and to specify a blank column for the vocabulary description, specify the following in the CSV file:
loanVocab,,Customer
Format of the Vocabulary CSV Input File
Column
Description
Can Column Be Blank
VOCAB_NM
The name of the vocabulary where you want to add entity and term specified by VOCAB_ENTITY_NM and VOCAB_TERM_NM.
No
VOCAB_SHORT_ DESC
The description of the vocabulary.
Yes
VOCAB_ENTITY_NM
The name of the entity that the term in the VOCAB_TERM_NM column belongs to.
No
VOCAB_ENTITY_ SHORT_DESC
The description of the entity.
Yes
VOCAB_TERM_NM
The name of the term.
No
VOCAB_TERM_ SHORT_DESC
The description of the term.
Yes
VOCAB_TERM_DATA _TYPE_TXT
The data type of the term. Specify Character, Decimal, Integer, Boolean, Date, or Datetime.
No
VOCAB_TERM_ DOMAIN_TYPE_TXT
The domain type for the term. Specify discrete, continuous, or Boolean. A domain value is discrete if it is just an individual value such as 5.3 or 18JUL2012:10:25:00. A domain value is continuous if it specifies a range such as >5 or <18JUL2012:10:25:00. Terms that are assigned the data type Character can have discrete domain values only. Boolean terms can have Boolean domain values only.
No
VOCAB_TERM_ DOMAIN_TXT
The set of expected values for a term. Separate individual domain values with a semi-colon (;). See Specify Domain Values in SAS Decision Manager: User's Guide for more information.
Yes
VOCAB_TERM_ INPUT_EXCLUDE_ FLG
Specifies whether the term must be mapped to a column in an input data set. Specify Y or N.
No
VOCAB_TERM_ OUTPUT_EXCLUDE_ FLG
Specifies whether to exclude the term from the output data sets created by rule flows. Specify Y or N.
No
FOLDER_PATH
The pathname to the business rules folder for the rule flow. This path must exist. Separate folder names with forward slashes.
No