BookmarkSubscribeRSS Feed
jbond007
Obsidian | Level 7

Hi Communities,

 

Once you created a New connection to connect to database from SAS EVM, how does SAS VIYA sync the tables created on CASLIB from the database? Is it real-time? Or is there a job that keeps the tables updated?

1 REPLY 1
SASJedi
SAS Super FREQ

Short answer:
SAS Viya does not synchronize in-memory tables with the caslib data source.

 

Long explanation:  

Here is a functional description of how caslibs work. Caslibs have two related (but not synchronized) locations for data:
1. Source files. No matter the format of the source where a caslib physically stores data, all data in that location are referred to as files. Files cannot be processed in CAS.

2. Tables. CAS tables always reside in memory and can be processed in CAS. They are not directly associated with a particular file.

To process data from a file in CAS, you must first load the file as a table (copy the data from the file into memory). The in-memory copy is the CAS table. You can process the table in CAS. If you make changes to the table and want to make the changes persistent, you must save the table to a file to a caslib's data source. You can save it to any caslib's data source you wish - it's not linked in any way to the original file. 

For example, consider a CAS session with two caslibs - CASUSER, a file-based caslib, and CASDB, a caslib connected to an oracle schema named myDBMS. I load mydata.csv file from my CASUSER caslib to an in-memory table named myCasTable in the CASUSER library (casuser.myCasTable). I manipulate casuser.myCasTable to clean and prep the data. Then I save the data to the CASDB "files" as myDBTable.  If you now query Oracle using sqlplus, you will find a new table named myDBMS.myDBTable containing the same information as the CAS table casuser.myCasTable.

Check out my Jedi SAS Tricks for SAS Users

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 238 views
  • 0 likes
  • 2 in conversation