Score a Model Using a SAS Data Integration Studio Job

In this exercise, you create a SAS Data Integration Studio scoring job by using the Loan mining result from the SAS Metadata Repository. After you create the job, you run the job and view the output.

Open the SAS Data Integration Studio Desktop

To log on to SAS Data Integration Studio:
  1. Launch SAS Data Integration Studio.
  2. If prompted, create a SAS Metadata Profile for the SAS Metadata server.
  3. Log on with the profile for SAS Metadata server.

Create a New Job

To create a new job, follow these steps:
  1. Use the New Job Wizard to add the job:
    1. From the SAS Data Integration Studio window, right-click My Folder. Then select New then selectJob. The New Job dialog box appears.
    2. In the Name box, enter Tutorial11 and click OK.
      Note: If prompted to choose a default application server, select SASApp, click Test Connection, and click OK in the confirmation message. Then click OK in the Default Application Server window.
    3. Click the Inventory tab, expand Table, and find the tables SCORE_INPUT and SCORE_OUTPUT that have the folder location for the Tutorial11 data sets. Here is an example: /Shared Data/Model Manager/Tutorial11.
    4. Click and drag SCORE_INPUT to the Diagram tab. Click and drag SCORE_OUTPUT to the Diagram tab. Position the SCORE_INPUT node farthest to the left. Position the SCORE_OUTPUT node farthest to the right. These nodes are the beginning and ending nodes in the diagram. Leave enough space between them for two additional diagram nodes to occupy.
      Nodes for SCORE_INPUT and SCORE_OUTPUT
    5. Click the Transformations tab and expand Access. Select and drag Table Loader to the Diagram tab. Place the Table Loader node before the HMEQ SCORE_OUTPUT node.
    6. From the Transformations tab, expand Data. Select and drag Model Scoring to the Diagram tab. Place the Model Scoring node between the HMEQ SCORE_INPUT node and the Table Loader node. Here is the Diagram tab:
      Tutorial11 with all nodes
    7. Double-click the Model Scoring node. The Model Scoring Properties window appears. Click the Models tab, expand Mining Results, and select Loan. The UUID in the Key box is the UUID of the Loan project in SAS Model Manager.
  2. Click the Target Table Columns tab. Expand OutputTable, select score, and click Right arrow button. Click OK.
  3. Drag the output handle from the SCORE_INPUT node to the Model Scoring node. The half-filled circle on the Model Scoring node is changed to a check mark to indicate that the node requirements have been met.
  4. Drag the output handle from the Model Scoring node to the Table Loader node.
  5. Drag the output handle from the Table Loader node to the SCORE_OUTPUT node. The half-filled circle on the Table Loader node is changed to a check mark to indicate that the node requirements have been met. Here is the diagram:
    SAS Data Integration Studio diagram
  6. Save the job. Click Filethen selectSave.

Run the SAS Data Integration Studio Scoring Job

To run the job and view the output, follow these steps:
  1. On the Diagram tab, click Run. The Tutorial11 job runs. Here is the job status:
    SAS Data Integration Studio job status
  2. To view the output, right-click the SCORE_OUTPUT node and select Open. Here is the output:
    SAS Data Integration Studio Scoring Output

Verify the Model Code Used in the Job

To verify that you have used the correct model, view the model code that was used in the SAS Data Integration Studio job.
Click the Code tab and scroll down through the lines until you find the following comment block:.
   *------------------------------------------------------------*;
* TOOL: Score Node;
* TYPE: ASSESS;
* NODE: Score;
*------------------------------------------------------------*;
*------------------------------------------------------------*;
* EM SCORE CODE;
* VERSION: 7.1;
* GENERATED BY: mdlmgradmin;
* CREATED: 19JAN2011:14:19:11;
*------------------------------------------------------------*;
*------------------------------------------------------------*;
* TOOL: Input Data Source;
* TYPE: SAMPLE;
* NODE: Ids;
*------------------------------------------------------------*;
*------------------------------------------------------------*;
* TOOL: Decision Tree;
* TYPE: MODEL;
* NODE: Tree;
*------------------------------------------------------------*;
****************************************************************; 
******             DECISION TREE SCORING CODE             ******; 
****************************************************************; 
The NODE value that is associated with TYPE: MODEL is the model name. In this case, the model name is Tree.