BookmarkSubscribeRSS Feed

Capturing SAS SpeedyStore Real-Time Updates in SAS Visual Analytics: A New Configuration

Started ‎06-22-2026 by
Modified ‎06-22-2026 by
Views 265

A long time ago in a galaxy far, far away... I wrote a post about near real-time dashboarding in SAS Visual Analytics using SAS SpeedyStore (formerly SAS Viya with SingleStore).

 

It was—and still is—a very powerful capability. It enables users to visualize updates made directly in their SpeedyStore database from SAS Visual Analytics without reloading tables into CAS or duplicating data.

 

nir_post_112_01_dashboard_small.gifThe setup was relatively straightforward. However, because SAS Visual Analytics is designed to optimize performance through caching, an additional configuration step was required: a special data filter had to be added to each report to bypass the cache and ensure fresh data was retrieved from the database.

 

Although this approach worked well, it required extra configuration in every report and added unnecessary overhead to every query.

 

Starting with SAS Viya 2026.03, this configuration has been redesigned and simplified. A more elegant solution is now available, eliminating the need for report-level cache-bypass filters while improving maintainability, query efficiency, and the overall user experience.

 

 

 

Before

 

The previous procedure was as follows:

 

  1. Configure the SAS SpeedyStore CASLIB.
  2. Load the SpeedyStore table into CAS.
  3. Configure the SAS Visual Analytics report to use Periodically reload report | page | object data.
  4. Apply a special Data Filter to the report's data source to disable data caching.

 

Steps 3 and 4 were performed at the report level in SAS Visual Analytics. As a result, every report requiring near real-time updates had to be configured individually.

 

 

 

Now

 

With the new configuration, the process becomes simpler, easier to maintain, and more performant:

 

  1. Configure SAS Visual Analytics with a special setting (one-time configuration).
  2. Configure the SAS SpeedyStore CASLIB with a special setting.
  3. Load the SpeedyStore table into CAS.
  4. Configure the SAS Visual Analytics report to use Periodically reload report | page | object data.

 

Notice that the special Data Filter is no longer required. The caching behavior is now controlled centrally through SAS Visual Analytics and the CASLIB definition.

 

In addition to simplifying report development, this approach removes the special filter condition that previously had to be included in every query sent to SpeedyStore, resulting in cleaner and potentially more efficient query execution.

 

 

 

The new configuration relies on two settings working together to control caching behavior: one in SAS Visual Analytics and one in the CASLIB definition.

 

Let's start with the SAS Visual Analytics setting.

 

A new global SAS Visual Analytics option, enableDataCachePolicyCheck, can now be enabled. When set to true, SAS Visual Analytics checks the data source (the CASLIB) before deciding whether caching should be enabled or disabled.

 

This does not disable caching globally. Instead, it allows SAS Visual Analytics to selectively disable caching for data sources that are explicitly configured for near real-time access.

 

To enable this option, navigate to:

 

SAS Environment Manager > Configuration > Definitions > sas.reportdata.properties > Add property

 

and add the following property:

 

  • Name: enableDataCachePolicyCheck
  • Value: true

 

nir_post_112_02_enableDataCachePolicyCheck.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

 

Once the property has been added, wait a few minutes for the Report Execution Service to restart and apply the new configuration.

 

 

 

Now let's look at the CASLIB side.

 

A new CASLIB option, dataCachePolicy, can be used to control caching behavior for a specific CASLIB. To disable caching, set its value to "OFF".

 

Although this option is available for all CASLIB types, it is particularly relevant for SpeedyStore. When a SpeedyStore table is loaded—or more accurately, declared—in CAS, the data is not copied into CAS memory. Instead, CAS maintains a reference to the source table and retrieves the data as needed.

 

One thing to note is that this option is not yet exposed through the CASLIB statement or the user interface. Support is expected in a future release.

 

For now, you'll need to create the CASLIB using the table.addCaslib CAS action:

 

/* SpeedyStore caslib */
proc cas ;
   action table.addCaslib /
      name='speedy',
      description='My SpeedyStore Caslib',
      session=false, /* Global CASLIB */
      dataSource={
         srcType='SingleStore',
         host="&MYS2HOST",
         port=&MYS2PORT,
         uid="&MYS2UID",
         pwd="&MYS2PWD",
         database="&MYS2DB",
         epDatabase="&MYS2DBWORK",
         udfDatabase="&MYS2DBUDF",
         aggregatePushdown=true
      },
      dataCachePolicy="OFF" ; 
quit ;

 

To verify that the option has been applied successfully, run the following code and look for DataCachePolicy Off in the SAS log:

 

proc cas ;
   output log ;
   action table.caslibinfo / caslib="speedy" extended=true verbose=true ;
quit ;

 

 

 

Once both configurations are in place, you're ready to load (or declare) SpeedyStore tables in CAS, build reports in SAS Visual Analytics, and configure objects for periodic refresh. SAS Visual Analytics will then rerun the query directly against the SpeedyStore source data at each refresh interval, bypassing the cache. Any updates made to the underlying data will be reflected in the report on the next refresh cycle.

 

It's important to remember that both settings are required for this behavior. If you want caching to remain enabled, simply omit dataCachePolicy="OFF" when creating the CASLIB. Likewise, periodic refresh remains optional and can be configured independently at the report, page, or object level.

 

This flexibility allows you to choose the right balance between freshness and performance for each reporting scenario. For most data sources and use cases, caching will continue to provide the best overall performance and user experience.

 

Thanks for reading.

 

 

Find more articles from SAS Global Enablement and Learning here.

Contributors
Version history
Last update:
‎06-22-2026 10:10 AM
Updated by:

Viya Copilot Motion Graphic.gifViya Copilot Motion Graphic

Ready to see what SAS Viya Copilot can do?

Visit the Tips & Tricks page for setup guidance, demos, and practical examples that show how Copilot supports your workflows.

Get Started →

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