In this article we walk through what a SAS Studio Workspace is, how you can use it to be more productive and two snippets to help you can make using Workspaces even more powerful.
Workspace files in SAS Studio enable you to specify files that are going to be opened on startup. This is helpful when working across different projects where you need context, certain programs or context files to be available to enable you to collaborate better or be ready to work faster.
Creating a Workspace file is simple you just click on the New button in the top toolbar of SAS Studio. In the menu that opens up you select Workspace which is revealed by hovering over the More file types menu entry. This opens up a new file called Workspace.workspace.
Workspace files follow the following JSON syntax:
{
"openfiles": [
{"path": "sasserver:/path/to/file.extension"},
{"path": "sascontent:/path/to/file.extension"}
]
}
The array opened contains a list of objects where each object represents a file that will be opened. You have to first enter a notation to indicate if your file is located within SAS Content (sascontent) or on the SAS Server (sasserver). After the colon you have to specify the full path to the file, including the files name and its extension - you can get this by right clicking a file and from the context menu select Copy path.
Finally we have to save our workspace file. You can save workspace files on both SAS Content and on the SAS Server. My main recommendation is to save it alongside the project for which you have created it so that everything is in the same place.
There is two main ways of using workspace files:
Let's first talk about setting workspace files for your on start-up configuration. This option can be found by clicking on your profile within in SAS Studio and then selecting Settings. Then in the section SAS Studio there is the entry Start-up and in the dropdown Tabs to open you will find the following entries:
The second way is to utilize the URL parameter sas-studio-workspace. This parameter empowers you to append the URL in the following way:
https://sas-viya-base-url/SASStudio?sas-studio-workspace=sascontent:/path/to/file.extension
Of course if you have stored the file on the SAS Server replace sascontent with sasserver. If you open up SAS Studio in this way than the workspace file will be run and its specified files will open up. Saving these links to project documentations can help everybody to easily context switch and be ready to go right away.
Here I am sharing two SAS Studio Snippets that I created for myself to help me work with workspace files:
You can download these snippets and upload them via the Sinppets pane and clicking the Upload snippets to My Snippets button.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.