Exporting Models

About Exporting Models

SAS Model Manager exports a model by creating a MiningResult object in a SAS Metadata Repository. You can use the model information in the MiningResult object to set up a scoring environment. A scoring application might use SAS Data Integration Studio or SAS Enterprise Guide to access the metadata and run a batch job or stored process that executes the score code. SAS Real-Time Decision Manager can also read the metadata and use it in that process environment. If you export a project champion model, the scoring application always uses the most current champion model.
Note: SAS Model Manager cannot export models whose Score Code Type model property is set to SAS Program.
SAS Model Manager uses the SAS Folders view to export the model to any folder that is accessible to the user. These folders include all folders in the SAS Foundation repository and folders in custom repositories that are created in SAS Management Console to reflect the structure of your business organization.
These are the tasks that you perform to export models:

Export a Model

To export a model, follow these steps:
  1. Right-click the model that you want to export and select Export Modelthen selectExport Model into SAS Metadata Repository from the pop-up menu. The SAS Metadata Repository window appears. SAS Model Manager displays metadata folders.
    SAS Metadata Repository Window
  2. Select the folder to where you want to export the model.
  3. Enter the name for the model and click Save.
  4. Click Save. If a MiningResult object is in the repository that has the same name as the object, then you are asked whether to overwrite the metadata for this stored object.
    Note: Do not overwrite an existing MiningResult object unless you are certain that the model is from the same project in SAS Model Manager.
Note: If the score code for the model changes, then export the model again to ensure that your score application uses the current scoring code.

Export a Project Champion Model

To export the champion model for a project, you must have already assigned the default version. SAS Model Manager examines the project and always exports the champion model in the default version. When the default version for a project changes and you export the model again at the project level, the scoring application automatically uses the latest score code.
Note: SAS Model Manager cannot export models whose Score Code Type model property is set to SAS Program.
To export the champion model for a project, follow these steps:
  1. Verify that the project that you want to export has a default version assigned. Select the project folder to examine its properties. The Default Version property contains the name of the default version.
  2. Right-click the project name and select Export Project Champion Model from the pop-up menu. If the project is not locked, you are prompted to confirm exporting the champion model. The SAS Metadata Repository window appears. SAS Model Manager displays the metadata folders.
  3. Select a folder to which you want to export the model.
  4. Click OK. If a MiningResult object is in the repository that has the same name as the object, then you are asked whether to overwrite the metadata for this stored object.
    Note: Do not overwrite an existing MiningResult object unless you are certain that the project is from the same project in SAS Model Manager.

Verify the Model Export

To verify that SAS Model Manager successfully created the MiningResult object in the metadata repository for an exported model, use SAS Management Console. To view the contents of the exported model or project, you can use SAS Data Integration Studio. You can also use SAS Management Console to export the MiningResult object to a SAS package.
To view a MiningResult object in the metadata repository, follow these steps:
  1. In SAS Management Console, open a SAS Model Manager metadata profile that connects to the SAS Metadata Server.
  2. From the SAS Management Console Folders tab, expand the folder to which you exported the model. When you select the folder, the right pane lists the MiningResult objects for the exported models.
  3. Right-click the MiningResult object that has the name of exported model or project and select Properties from the pop-up menu. The Properties window appears.
  4. Examine the Keywords box on the General tab to verify that the MiningResult object contains the UUID of the exported project or model.
    Note: You can use the UUID to conduct filtered searches and query the exported models. For more information, see Query Folders, Projects, and Versions.
  5. Examine the metadata on the Advanced tab to determine when the MiningResult object was created or most recently updated.
  6. Click OK.