BookmarkSubscribeRSS Feed

Connecting Visual Studio Code to SAS® Viya® for Learners

Started 2 weeks ago by
Modified 2 weeks ago by
Views 172
LGroves_0-1776780014084.png

Extending the Learning Environment Beyond the Browser

 

Why This Matters

 

SAS® Viya® for Learners (VFL) is designed to make analytics accessible—quickly. With tools like SAS Studio, Visual Analytics, and JupyterLab available in a browser, students can begin exploring data, building models, and generating insights within minutes.

 

But as R/Python + SAS coding projects grow beyond a single session, a natural question emerges:

 

How do I continue my work tomorrow?

 

Part of the answer lies in how VFL is designed.

 

The Jupyter environment in SAS Viya for Learners is intentionally session-based, meaning work stored locally in that environment does not persist automatically between sessions. This design supports scalability, security, and global access for thousands of users.

 

However—and this is important—this does not mean your coding work has to be temporary in VFL.

 

In practice, learners are encouraged to use tools like GitHub integration to persist and manage their coding projects across sessions. This mirrors real-world workflows and provides a reliable way to store, version, and revisit projects over time. In other words, persistence in VFL is achieved through integration—not local storage alone.

 

For many learners, this becomes a turning point:

 

  • Projects span multiple days or weeks
  • Code – and languages – evolves and needs to be versioned
  • Files and datasets need structure and persistence
  • Work begins to resemble real-world analytics workflows

 

And that’s usually the moment when the browser alone starts to feel limiting—especially for more code-heavy workflows and those wanting to keep some files local.

 

This is where connecting Visual Studio Code (VS Code) to SAS Viya for Learners becomes especially valuable.

 

When (and Why) You Might Use VS Code with VFL

 

Before diving in, it’s worth clarifying something important:

 

This workflow is not intended to replace the core SAS Viya for Learners experience.

 

For many users—especially those newer to analytics—VFL already provides everything needed through:

 

  • Visual Analytics
  • Model Studio
  • SAS Studio
  • JupyterLab

 

These tools support code, no-code, and low-code analytics workflows, and for many learners, that’s exactly where the journey should begin.

 

Who This Is For

 

Connecting Visual Studio Code to SAS Viya for Learners is most valuable for:

 

  • Users with prior coding experience, particularly languages beyond R + Python
  • Those already comfortable in environments like VS Code
  • Learners working with larger or more complex datasets, who want to keep some of those files locally
  • Individuals integrating SAS into an existing development workflow

 

How This Fits into the Bigger Picture

 

Rather than replacing VFL, this approach extends it.

 

A common workflow might look like:

 

  • Use VS Code for:
    • Data wrangling
    • File management
    • Version control
  • Use SAS Viya (VFL) for:
    • Visual exploration
    • Model building
    • Decision-making

 

The Key Idea

 

VS Code can help you prepare and manage the work—especially if you already prefer those coding tools and are already working locally.

 

SAS Viya helps you analyze, model, and make decisions.

 

What This Enables

 

By connecting VS Code to SAS Viya for Learners, you combine:

 

🌐 Cloud Analytics (SAS Viya)

  • Scalable compute
  • Enterprise-grade analytics capabilities
  • Access to SAS, Python, R, and CAS

 

💻 Local Development (VS Code)

  • Persistent file storage
  • Organized project structure
  • GitHub integration and version control in a local environment
  • Extensible development environment, so you can use coding languages not supported in VFL

 

Together, this creates a workflow that moves beyond “running code” toward building solutions that persist, evolve, and scale.

 

A Quick Positioning Note: VFL vs. SAS Viya Workbench for Learners

 

At this point, it’s worth addressing a common question:

 

Doesn’t SAS already offer an environment that solves this persistence challenge?

 

Yes—SAS Viya Workbench for Learners (WFL) provides a more traditional, persistent development experience with full control over files and environment configuration. Moreover, WFL provides access to SAS, Python, and R in two main IDEs: VS Code and Jupyter.

 

However, SAS Viya for Learners serves a different purpose:

  • It includes no-code and low-code tools (e.g., Visual Analytics, Model Studio)
  • It supports end-to-end analytics workflows
  • It is designed for broad accessibility across skill levels

 

In short:

  • Workbench emphasizes development workflows
  • VFL emphasizes platform breadth

 

The integration of VS Code to SAS Viya for Learners allows you to extend VFL with development capabilities, rather than replacing it.

 

This approach brings the two closer together—without asking you to choose.

 

Step 1: Install Visual Studio Code Locally

 

If you do not already have Visual Studio Code installed:

 

 

Once installed, you’re ready to connect to SAS Viya for Learners.

 

Step 2: Connect VS Code to SAS Viya for Learners

 

Step-by-Step Instructions

 

The connection process only takes a few minutes. Here’s how to get set up.

 

1. Open your local Visual Studio Code application… and say hello!

 

LGroves_1-1776780014093.png

 

2. Next, navigate to the Extensions Marketplace

 

LGroves_2-1776780014095.png

 

3. Search for and install the SAS extension

 

LGroves_3-1776780014097.png

 

4. Let’s review some important fine print… as it explains the why behind the next few steps:

 

LGroves_4-1776780014100.png

 

5. Open Settings and locate the SAS configuration

 

LGroves_5-1776780014101.png

 

6. Under Features > Extensions, edit your settings.json file to define a connection profile, found here:

 

LGroves_6-1776780014106.png

 

7. Update your SAS connection profile with your VFL environment URL and connection details. Your file should resemble the following example.

 

LGroves_7-1776780014107.png
  • Note: The example below references the vfl-040 environment. To identify your assigned environment (vfl-XXX), log into your VFL account.

8. Authenticate using your SAS Viya for Learners credentials

 

  • First, save your .json file and then click Sign in in the SAS Application:

 

LGroves_8-1776780014108.png

 

  • You’ll then see:

 

LGroves_9-1776780014108.png

 

  • Click Allow. The next prompt asks:

 

LGroves_10-1776780014109.png

 

  • Click Open to continue. You are then taken to the SAS Viya for Learners login screen:

 

LGroves_11-1776780014122.png

 

  • Type in your Username/Email. Then select Next. Enter your password on the next screen, if needed.
  • SAS Admins will get a prompt like this:

 

LGroves_12-1776780014124.png

 

  • Admins can click Authorize Access. Both Admins and Non-Admins will then receive this prompt:

 

LGroves_13-1776780014125.png

 

  • Highlight and copy the Authorization Code.

 

9. Paste the authorization code when prompted

 

  • Go back to VS Code and at the top you will see a prompt to paste in the Authorization Code. Paste it, and then press Enter.

 

LGroves_14-1776780014125.png

 

Once complete, you will be connected and able to run SAS code directly from VS Code using your VFL environment.

 

Where Did My Files Go? (VS Code Edition)

 

After connecting, you may notice something… slightly confusing:

 

“Where is my casuser folder?”

 

In SAS Studio, it appears here:

 

Files → Home → casuser

 

But in VS Code, it’s not immediately visible.

 

Understanding What You’re Seeing

 

This comes down to how SAS Viya organizes data behind the scenes.

 

There are actually two different concepts at play:

 

  • CASUSER (uppercase) → an in-memory CAS library
  • casuser (lowercase) → a physical folder on the compute server

 

SAS Studio presents these in a unified way, making navigation intuitive.


VS Code, however, shows the underlying file system directly.

 

The “Missing” Folder

 

The casuser folder exists—it’s just nested deeper in the file system.

 

A typical path looks like: /export/viya/homes/<your-id>/casuser

 

In VS Code, you can find it by navigating through:

 

SAS Server → Home → export → viya → homes → <your-id> → casuser

 

Once located, you’ll see your files exactly as expected.

 

Why This Matters

 

This distinction helps clarify how SAS Viya operates:

 

  • Files (e.g., .sashdat, .csv, .json) live on disk
  • CAS tables live in memory
  • SAS Studio blends these experiences
  • VS Code exposes them separately

 

Understanding this separation is key to working effectively across tools. And once you see this distinction, many other parts of SAS Viya start to make more sense.

 

Note: While VS Code surfaces the file system, you can still interact with CAS (in-memory data) through SAS code executed from VS Code—allowing you to load, analyze, and manage tables within CAS as part of your workflow.

 

Step 3: Accessing Files in casuser

 

Once you’ve located the folder, you can:

 

  • Open files directly in VS Code
  • Edit and save changes persistently
  • Organize your project structure
  • Sync files with GitHub if desired

 

This provides a much more traditional and flexible development experience compared to working solely within a browser session.

 

Optional: Recommended Extensions

 

To enhance your workflow, consider installing:

 

  • Python and/or R (for hybrid workflows)
  • Jupyter (for notebook support)
  • GitHub Copilot (optional AI-assisted coding)

 

These extensions can help bridge SAS and open-source workflows within a single environment.

 

Bonus: Bypassing the 100 MB Upload Limit

 

If you’ve spent time working in SAS Viya for Learners, you may already be familiar with one important constraint:

 

Individual file uploads through SAS Studio are limited to 100 MB.

 

(Find my old posts here: Part 1 and Part 2).

 

This limit exists for good reason—helping maintain performance and ensuring a consistent experience across thousands of users.

 

In previous work, we explored creative ways to work within this constraint, including:

 

  • Compressing files before upload
  • Splitting large datasets into smaller pieces
  • Reconstructing data within SAS

 

But here’s a useful (and often overlooked) detail:

 

When using VS Code connected to SAS Viya for Learners, you are no longer limited by the browser-based upload restriction for a single file.

 

Because VS Code interacts directly with the underlying file system, you can:

 

  • Upload larger files directly to your casuser directory
  • Avoid manual splitting or compression steps
  • Work with larger datasets more naturally

 

Note: the total storage limit—typically 5 GB—still applies

 

Why This Matters

 

This isn’t just a convenience—it changes what’s possible in a teaching and learning environment:

 

  • Larger, more realistic datasets
  • Fewer workarounds during instruction
  • A smoother experience for both educators and students

 

Quick Take

 

The 100 MB limit is a browser constraint—not a platform limitation.

 

Step outside the browser… and a few more doors open.

 

Finally, if you’ve ever found yourself wondering “Where did my files go?” or working around upload limits, you’re not alone—these are natural signals that you’re ready to extend your workflow beyond the browser.

 

Final Thoughts

 

SAS Viya for Learners is designed to help students get started quickly—and supports persistent, scalable analytics workflows through its platform and integrations.

 

Connecting it to Visual Studio Code provides an additional layer of flexibility for those who prefer a local development environment—and who want to process some files locally.

 

This combination allows users to:

 

  • Work persistently and manage files locally
  • Structure projects more effectively
  • Integrate with tools like GitHub in their local environment
  • Extend analytics workflows across languages and environments, beyond Python and R

 

SAS Studio and the broader Viya platform provide a powerful, accessible analytics experience.

 

VS Code adds flexibility for those who want to extend that experience into a more traditional development workflow using some local files and processing.

 

Learning how these tools work together is where things really start to click.

 

Additional Resources

 

Contributors
Version history
Last update:
2 weeks ago
Updated by:

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore 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