BookmarkSubscribeRSS Feed

SAS Proc Accelerator and Model Deployment to SAS SpeedyStore

Started 3 weeks ago by
Modified 3 weeks ago by
Views 148

SAS Proc Accelerator and Model Deployment to SAS SpeedyStore

Move the Model, not the Data.

Introduction

This is a short guide on how to publish and run a model inside SAS SpeedyStore using the Proc Accelerator. Proc Accelerator is a SAS procedure designed to publish and run analytical models directly inside external data platforms.

Publish and Run

I have used Model Studio to build a Pipeline and will publish and run a Neural Network model inside SAS SpeedyStore.

To find the model table, we right click the Neural Network node and select Results.

patric_0-1768395758091.png

 

In the results, scroll down to “Path EP Score Code” and look for the “Node Id:” in the score code. This will help us find the model table.

Also make sure to copy the score code into a SAS Program file on the Viya server. The score code contains variable selections and other preprocessing steps, which we need to publish the model correctly.

patric_1-1768395785313.png

 

Now we search for the “Node Id:” name in our MODELS caslib (The name of the caslib can differ between environments).

patric_2-1768395803537.png

 

Once we have located the model table, we move into SAS Studio.

In SAS Studio we begin by creating an analytic store file from the model table.

/*Create astore file*/
proc astore;
   download rstore =models._B9BPV7RCZ0K0RYGKJIIVD3M97_AST
            store = "NN_TELCO_CHURN.sasast";
run;

After the Astore file has been created, we can publish the model to SAS SpeedyStore.

/*Publish Model */
proc accelerator library=SASMOD /*Compute Libname to SpeedyStore Database */;
   publishModel
/*Name of the model table created in SpeedyStore, in the database that the libname SASMOD points to*/
      modeltablename="NN_TELCO_CHURN" 
        /*Path to the EP Score code, that we copied from Model Studio*/
      programfile="/srv/nfs/kubedata/compute-landingzone/swepaa/git/gitlab_sasstudio/programs/EPscorecode.sas" 
        /*Name of the astore file created in previous step */
      storefiles="NN_TELCO_CHURN.sasast";
run;
quit;

When the model has been published, we can view it in SingleStore(SpeedyStore) Studio.

patric_3-1768395938280.png

Now that we have successfully published our model, we can start scoring data. The data doesn’t not leave SpeedyStore during the execution of the model.

/*Run Model*/
proc accelerator library=SASMOD /*Compute Libname to SpeedyStore Database */;
   runmodel
        /*Name of the Model table */
      modeltablename="NN_TELCO_CHURN"
        /*Two-part name to the SpeedyStore input table.*/
        /*SASDP is a compute library pointing to a database in SpeedyStore*/
        /*TELCO_CHURN_ABT is the table to be scored, which recides in SpeedyStore*/
      INPUTTABLENAME="SASDP.TELCO_CHURN_ABT"
        /*Two-part name to the SpeedyStore output table*/
      outputtablename="SASDP.TELCO_CHURN_SCORED";    
run;

Conclusion

With SAS Proc Accelerator, the model moves to the data, not the other way around. By publishing the model directly into SpeedyStore and executing it inside the database engine itself, you eliminate costly data movement, reduce latency, and keep your scoring pipeline lean and efficient. This approach ensures that your analytical workloads stay close to where the data lives—delivering faster, scalable, and production‑ready insights with minimal infrastructure overhead.

Contributors
Version history
Last update:
3 weeks ago
Updated by:

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Tags