In this follow-up, we’ll answer a practical question:
How does DuckDB actually run inside SAS Viya?
Understanding where DuckDB fits in the SAS Viya architecture helps clarify how it behaves, how it performs, and how to use it effectively.
DuckDB Runs Inside the SAS Compute Server
One of the most important things to understand is that DuckDB in SAS Viya is not a separate service and not an external database.
Instead, DuckDB runs directly inside the SAS Compute Server session.
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
Each SAS Compute Server session (typically one per user or per job) can host its own embedded DuckDB instance. In practical terms, this means:
- DuckDB executes inside your SAS session
- It uses the same resources (CPU, memory, and file system) allocated to that session
- There is no network connection between SAS and DuckDB
- All execution happens in-process, rather than through a client/server architecture
This design is fundamentally different from traditional databases and explains why DuckDB often feels extremely responsive when used from SAS.
What This Architecture Enables
Because DuckDB runs in-process within the Compute Server, it behaves like an embedded analytics engine rather than an external platform.
This enables several flexible usage patterns:
- Fast in-memory analytics within a session
- Persistent file-based DuckDB databases stored as .duckdb files
- Direct querying of external data files such as CSV, Parquet, JSON, Delta Lake, and Iceberg
All of this is exposed through the DuckDB LIBNAME engine , which means you interact with DuckDB using familiar SAS concepts while benefiting from DuckDB’s SQL engine and file-format support.
This makes DuckDB a natural bridge between SAS and modern open data ecosystems.
Working with Open Formats
One particularly powerful aspect of DuckDB in SAS Viya is its ability to operate directly on modern file and table formats .
Instead of requiring data to be imported into a proprietary structure, DuckDB can query data stored as:
- Parquet
- CSV
- JSON
- Delta Lake
- Apache Iceberg
- and more…
This allows you to bring computation to the data, rather than moving data into SAS first — an increasingly important pattern in modern analytics architectures.
Resource Considerations
Because DuckDB runs inside the Compute Server, it consumes the same resources as your SAS programs.
This has important implications:
- Memory-intensive DuckDB workloads require sufficient RAM
- CPU -heavy queries depend on adequate CPU allocation
- File-based DuckDB databases benefit from reliable persistent storage
Using DuckDB effectively therefore goes hand in hand with properly sizing your SAS Compute environment. DuckDB is powerful, but it draws directly from the resources of your session.
Why This Matters
This architecture gives SAS users something extremely valuable:
- A modern SQL analytics engine embedded directly into their SAS environment
- Native support for open file and table formats
- High-performance analytics without deploying an external database
- A flexible way to extend SAS workflows toward modern data engineering patterns
DuckDB doesn’t replace SAS — it extends what’s possible within SAS.
What’s Next in the Series
Now that we understand where DuckDB runs and how it fits into SAS Viya, the next step is getting practical:
- Using DuckDB libraries
- Running queries
- Working with open formats
- Understanding performance and execution behavior
That’s exactly where the next posts in this series will go.
Coming soon: Working with DuckDB in SAS Viya , a new course that dives into all these powerful features. Don’t miss it!
Thanks for reading.