Creating a Model Table

Overview

When publishing a model in Oracle on which the SAS Embedded Process is deployed, you must create a table to hold the sasscore_modelname.ds2 and sasscore_modelname_ufmt.xml scoring files. You must run the %INDOR_CREATE_MODELTABLE macro to create the table before you run the %INDOR_PUBLISH_MODEL macro.
You have to create the table only one time to hold a model’s scoring files.
The model table contains the following columns. The ModelName column is the table key. The table is referenced by the two-level name schema-name.model-table-name.
Column Name
Description
Specification
ModelName
contains the name of the model
VARCHAR(128)
ModelDS2
contains the sasscore_modelname.ds2 file
BLOB not null
ModelFormats
contains the sasscore_modelname_ufmt.xml file
BLOB
ModelMetadata
reserved by SAS for future use
BLOB
ModelUUID1
contains the UUID of the source model
VARCHAR (36)
Notes1
contains additional information that describes the source model
VARCHAR (512)
1This column is for use by SAS Model Manager. If you have a model table that was created prior to SAS 9.4 and you want this column in your model table, you must run the %INDOR_CREATE_MODELTABLE macro to re-create your model table.

%INDOR_CREATE_MODELTABLE Run Process

To run the %INDOR_CREATE_MODELTABLE macro, complete the following steps:
  1. Start SAS and submit the following command in the Program Editor or Enhanced Editor:
    %let indconn = user=myuserid password=xxxx path=ortest;
    
    For more information, see the INDCONN Macro Variable.
  2. Run the %INDOR_CREATE_MODELTABLE macro.
    For more information, see %INDOR_CREATE_MODELTABLE Macro Syntax.

%INDOR_CREATE_MODELTABLE Macro Syntax

%INDOR_CREATE_MODELTABLE
(<DATABASE=database-name>
<, MODELTABLE=model-table-name>
<, ACTION=CREATE | REPLACE | DROP>
);
Arguments

DATABASE=database-name

specifies the name of an Oracle database where the sasscore_modelname.ds2 and sasscore_modelname_ufmt.xml scoring files are held.

Default The database specified in the INDCONN macro variable

MODELTABLE=model-table-name

specifies the name of the table that holds the sasscore_modelname.ds2 and sasscore_modelname_ufmt.xml scoring files.

Default sas_model_table
Requirement The maximum table name length is 30 characters, and it must be a valid Oracle table name.
Interaction The table name that you specify for this macro must be the same table name that is used in the %INDOR_PUBLISH_MODEL macro.
See %INDOR_PUBLISH_MODEL Macro Syntax

ACTION = CREATE | REPLACE | DROP

specifies one of the following actions that the macro performs:

CREATE

creates a new table.

Tip If the table has been previously defined and you specify ACTION=CREATE, an error is issued.

REPLACE

overwrites the current table, if a table with the same name is already registered.

Tip If you specify ACTION = REPLACE, and the current table contains sasscore_modelname.ds2 and sasscore_modelname_ufmt.xml files, the files are deleted and an empty table is re-created.

DROP

causes all models in this table to be dropped.

Default CREATE