How to Run a Scoring Model in SAP HANA

To run a scoring model using the SAS Embedded Process, follow these steps.
  1. Create a scoring model using SAS Enterprise Miner.
  2. Start SAS.
  3. Create a table to hold the scoring files.
    The %INDHN_CREATE_MODELTABLE macro creates a table that holds the scoring files for the model that is being published.
    For more information, see Creating the Model Table.
  4. Run the %INDHN_PUBLISH_MODEL macro to create the scoring files.
    The %INDHN_PUBLISH_MODEL macro performs the following tasks:
    • translates the scoring model into the sasscore_modelname.ds2 file that is used to run scoring inside the SAS Embedded Process.
    • takes the format catalog, if available, and produces the sasscore_modelname_ufmt.xml file. This file contains user-defined formats for the scoring model that is being published.
    • uses the SAS/ACCESS Interface to SAP HANA to insert the sasscore_modelname.ds2 and sasscore_modelname_ufmt.xml scoring files into the model table that was created using the %INDHN_CREATE_MODELTABLE macro.
    For more information, see Running the %INDHN_PUBLISH_MODEL Macro.
  5. Run the %INDHN_RUN_MODEL macro.
    The %INDHN_RUN_MODEL macro runs the scoring model. The macro uses the files that were created by the %INDHN_PUBLISH_MODEL macro as well as the table that contains the input data.
    For more information, see Running the %INDHN_RUN_MODEL Macro.
  6. Submit an SQL query against the output table.
    For more information, see Scoring Output.