Chapter 10. Techniques for data mining in an operational warehouse 387
2. Publish Phase
Use the SAS server software to publish the scoring model to InfoSphere
Warehouse (DB2)
3. Populate Phase
Register the SAS scoring model with the SAS embedded process in DB2,
making it available natively to InfoSphere Warehouse applications.
Using the new embedded process allows for high performance execution of the
scoring model in an operational warehouse environment with InfoSphere
Warehouse 10.1.
10.3.3 Access the scoring model
The SAS embedded process was developed and installed by SAS, and runs as a
fenced process in DB2 (db2sasep). The process is started and stopped using
new db2ida DDL commands or can be configured to start and stop automatically
with the DB2 instance. Examples of starting and stopping manually are shown in
Example 10-1.
Example 10-1 Starting and stopping the SAS embedded process in DB2
db2ida -provider sas -start
db2ida -provider sas -stop
db2ida -provider sas -stopforce
After the process is running, scoring models can be invoked using the
ANALYZE_TABLE function embedded in a SQL expression as shown in
Example 10-2.
Example 10-2 Invoking the SAS scoring model
SELECT * FROM T1 ANALYZE_TABLE (IMPLEMENTATION ‘PROVIDER=SAS;
ROUTINE_SOURCE_TABLE=USER1.SOURCE_TABLE;
ROUTINE_SOURCE_NAME=REGRESSION;’);
Note the following:
򐂰 Scoring input (ROUTINE_SOURCE_TABLE) can be a table, view, or
common table expression.
򐂰 The ROUTINE_SOURCE_NAME refers to the name of the model, which is
REGRESSION in this example.

Get Solving Operational Business Intelligence with InfoSphere Warehouse Advanced Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.