BookmarkSubscribeRSS Feed
PietariKoskela
SAS Employee

How a Christmas Cake Explains Data Sharing

 

Imagine you’ve baked a delicious Christmas cake at home. When you head to the holiday table, you want to enjoy it—and maybe share it with others. First, you need to bring the cake to the right house, where the celebration happens.

Inside the house, there are two places for treats:

  • The kitchen counter, where the cake waits patiently.
  • The holiday table, where everyone can enjoy it right away.

You can keep the cake on your own plate, just for you, or place it in the center of the table so others can taste it too. If you want to share, you’ll need to prepare it—slice it and remove the wrapping. And if the table ever flips and everything disappears, it’s good to have another cake waiting in the kitchen so you can bring it back.

If your recipe is a secret, you can put the cake straight on your plate without anyone seeing it. But if the table flips, you’ll need to fetch it from home again.

In short: Sometimes the treats are just for you, sometimes for everyone. And when you prepare them well, sharing becomes easy.

 

 
Now, you might wonder: how does this tie into getting data into SAS Viya?

For a while, I’ve been thinking about the simplest way to explain the main steps and differences when getting data into SAS Viya. So, here’s a festive analogy you can share when your relatives ask about it during Christmas dinner!

 

Your Data = Food, The Christmas Cake

Imagine the data on your computer—an Excel file, a CSV, or something similar—as a cake you’ve baked at home. You want to enjoy that cake at Christmas dinner and maybe share it with others. First, you need to bring the cake to the right place: the house where you’ll spend Christmas, the house of SAS Viya.

 

Two Key Spots in the House

Inside the house, there are two main places for food (data):

  • Dining Table = Memory
    Food on the dining table is ready to eat—fast and easy access (data loaded into CAS memory).
  • Kitchen Countertop = Libraries
    Food on the countertop is still available. You can easily bring food from the kitchen to the dining table, where eating is quick and convenient. You can also “taste” food directly from the kitchen (query data from libraries without loading into memory), but it’s slower than eating from the table.

Personal vs Shared Spaces

  • In the kitchen, you have personal libraries—your own space for food.
  • If you want to share, you prepare the cake (unwrap it and slice it) and move it to shared libraries on the countertop.

On the dining table, you have:

  • Your plate = Personal CAS session
  • Middle of the table = Global CAS sessions

You can have multiple plates (sessions) at once—each dish has its own plate. For example:

  • SAS Studio plate
  • SAS Visual Analytics plate

You can’t move food directly from one plate to another. To share, you need to promote the food from your plate to the middle of the table (global scope in CAS).

 

Promoting and Sharing

Promoting means making your data available beyond your plate:

  • When you promote, the table moves from session scope (private) to global scope in a CAS library.
  • Whether others can access it depends on permissions on that CASLIB and the table:
    • Promote to CASUSER → global table exists but effectively private to you.
    • Promote to a shared CASLIB with proper permissions → global table visible to others.

Once promoted, you can still replace the food—but you need to drop and reload the table to update it.

 

Automation and Recovery

You can automate moving food from the kitchen to the table. If the table flips (CAS restarts), the food is lost. Automation makes it easy to refill the table from the kitchen—provided your CASLIBs are configured with source paths and auto-load settings.

 

Secret Recipes

If your cake recipe is top secret, you might skip the kitchen and put the cake straight from your home onto your plate. You can promote it to the middle of the table but keep it private by using permissions. If the table flips, you’ll need to bring it again from home—no automation here.

 

In Short

  • Kitchen = Libraries (personal/shared)
  • Dining Table = CAS Memory (session scope vs global scope)
  • Promote = Move data from your plate to global CAS space
  • Permissions = Decide if promoted data is private or shared
  • Automation = Easy recovery from libraries if configured

So next time someone asks how to get data into SAS Viya, just tell them:
“It’s like bringing your Christmas cake to dinner—prepare it, place it, and share it!”