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, select My Folder. Then select New then selectJob. The New Job dialog box appears.
    2. In the Name box, enter Tutorial8 and click OK.
    3. Click the Inventory tab, expand Table, and find the tables SCORE_INPUT and SCORE_OUTPUT.
    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 Table Loader node before the SCORE_OUTPUT node.
    6. From the Transformations tab, expand Data. Select and drag Mining Results to the Diagram tab. Place the Mining Results node between the SCORE_INPUT node and the Table Loader node. Here is the Diagram tab:
      Tutorial8 with all nodes
    7. Double-click the Mining Results node. The Mining Results Properties window appears. Click the Mining Results 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 Mining Results node. The half-filled circle on the Mining Result node is changed to a check mark to indicate that the node requirements have been met.
  4. Drag the output handle from the Mining Results 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, select Run Process Button. The Tutorial8 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: Regression;
* TYPE: MODEL;
* NODE: Reg;
*------------------------------------------------------------*;
*************************************;
*** begin scoring code for regression;
*************************************;
The NODE value that is associated with TYPE: MODEL is the model name. In this case, the model name is Reg.