BookmarkSubscribeRSS Feed

Automate & Periodically Refresh SAS Enterprise Session Monitor Data in SAS Visual Analytics

Started ‎04-11-2025 by
Modified ‎04-11-2025 by
Views 457

In a previous blog, I discussed how you could leverage SAS Visual Analytics (VA) to uncover valuable insights and trends from data collected by SAS Enterprise Session Monitor (ESM). While that was useful in providing substantial insights, the manual data extraction and import process posed additional overhead, especially for teams seeking timely and updated analytics.

Good News! With ESM Release 2025.1.0, you can now automate this entire process—eliminating the tedious, manual overhead through scheduled data extraction and automated refresh using the SAS Viya Job Scheduler. This allows your SAS Visual Analytics reports to remain consistently up to date with minimal manual intervention.

 

Why Automate Data Refresh?

Automating data extraction and refresh:

  • Significantly reduces manual effort.
  • Ensures timely insights with updated reports.
  • Enhances accuracy by removing the possibility of human error during manual data handling.

 

Prerequisites for Automation

Before starting, ensure that you meet these requirements:

  • Access to SAS Viya environment or SAS Viya on Microsoft Azure.
  • Python is configured.
  • Proper permissions to create global CASLIBs.
  • The ESM data storage path (ex: /mnt/viya-share/data/esm) is included in your CAS allowlist.

 

Step-by-Step Guide to Automate ESM Data Extraction and Refresh

 

Step 1: Prepare Your Environment

Upload the following automation scripts into SAS Studio:

  • 0.1_ESM_Environment_Setup.sas
  • 0.2_ESM_Setup_CASLIB.sas
  • 0.3_ESM_Download_Utility.sas
  • ESM_Data_Refresh_Flow.flw

Note: These files are included within the ESM Maintenance Utility download.

prasadpz_0-1744291091289.png

 

Step 2: Setup Access

Edit 0.1_ESM_Environment_Setup.sas to set location information and provide credentials.

  • Verify each of the location information (base_location, customer_location, customer_cas_location) and change the default values as applicable to your case.
  • Enter the correct credentials (dl_usernamedl_password) obtained from your SAS Enterprise Session Monitor license key. This is used to download the latest Maintenance Utility files for data extraction and report data generation.
  • Similarly, you will need to provide ESM database connection information (db_host, db_username, db_password) if your ESM server is deployed outside of Kubernetes.
    Note: As a best practice for enhanced security, always take precaution not to store credentials in cleartext within the programs.
  • Change EXTRACT_MAX_AGE value to set the number of days of data you want to extract from ESM database.

 

Step 3: Execute the Automation Scripts

Run the scripts sequentially within SAS Studio, ensuring no errors or warnings:

  • 0.1_ESM_Environment_Setup.sas
  • 0.2_ESM_Setup_CASLIB.sas
  • 0.3_ESM_Download_Utility.sas

These scripts configure the environment, create the necessary CASLIB, and perform the initial Maintenance Utility files download.

 

Step 4: Schedule the Data Refresh Job

Execute the ESM_Data_Refresh_Flow.flw job within SAS Studio.

This flow:

  • Automates the regular extraction of data from the ESM database.
  • Loads the extracted data directly into the designated CASLIB.
prasadpz_1-1744291091294.png

 

To schedule the refresh flow job, see Schedule a Job Flow with a Time-Event Trigger, File-Event Trigger, or Both in SAS Viya Platform: Jobs and Flows.

You can also schedule it directly from SAS Studio by right clicking on the .flw file and choosing ‘Schedule as a Job’ option.

 

prasadpz_2-1744291091297.png

 

 

Review the execution logs periodically to verify successful completion.

 

Benefits of Automated Scheduling

Once set up, the Job Scheduler ensures continuous data updates with minimal human oversight, letting your team focus on analysis and decision-making rather than manual data operations.

Your reports in SAS Visual Analytics will always reflect the most current ESM data, significantly enhancing their business value.

 

prasadpz_3-1744291091309.png

 

Final Thoughts

Transitioning from manual to automated data extraction and refresh operations provides a robust, efficient, and accurate foundation for your analytics efforts. By leveraging the powerful capabilities of SAS Visual Analytics in combination with automated ESM data handling, your analytics team can spend less time on data prep and more time deriving actionable insights.

 

Happy monitoring and reporting!

 

 

Version history
Last update:
‎04-11-2025 10:14 AM
Updated by:

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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