BookmarkSubscribeRSS Feed
Somu
Fluorite | Level 6

Hi everyone,

Our SAS Viya setup is structured as follows:

SAS Code:

  • Engine – holds common code shared across all campaigns
    Campaigns (Campaign 1, Campaign 2, etc.) – contains code specific to each campaign

Shared Libraries:
Input datasets – common input files and SAS datasets used across campaigns
Output datasets – campaign-specific output files and SAS datasets generated at runtime
Database Libraries

These point to the respective database instance depending on which environment the code runs in.


The SAS code will be version controlled in GitLab, but the shared and database libraries will live under the /shared folder in SAS Viya and won't be pushed to GitLab. Since we have a single SAS Viya server(Production Instance), we are handling dev, pre-prod, and prod as logical separations within it.

Here is what I am trying to figure out:

  • GitLab version control – What are the recommended practices for managing SAS code check-in and check-out using GitLab in this kind of setup?
  • Dynamic environment variables – How do we pass environment-specific variables at runtime so the SAS code automatically knows which environment it is running in and behaves accordingly?
  • Environment-specific shared libraries – How do we maintain separate shared libraries for dev, pre-prod, and prod, and dynamically reference the correct one from within the SAS code?
  • Beyond these, I am also looking for guidance on the overall DevOps workflow that fits this setup, including the steps developers should follow day to day. Equally important is making sure there are guardrails in place so developers cannot accidentally modify or overwrite pre-prod or prod shared files while working in dev.

Any suggestions, experiences, or pointers to relevant documentation would be really helpful. Thanks in advance!