Watch the short video demonstration in this post. The video shows a SAS Viya and Azure DevOps pipeline. The pipeline focuses on data management activities in SAS Viya, such as running SAS programs and SAS Studio flows.
This is the second post in the series. The previous post offered an overview of SAS Viya CI/CD Pipelines with Azure DevOps.
This example shows an Azure pipeline which combines several data management tasks in SAS Viya:
The "trick" is to add everything that you need to run in a Git repository. Azure Repos are used in this example.
First, add the Azure Repo in SAS Studio. Second, create and test the SAS programs and SAS Studio flows in SAS Viya. Third, push the files containing the SAS programs and flows to the remote Git repository.
You can export the SAS Studio flow as a SAS package (JSON file) and then store it in the Git repository. You could also save the flow file directly (FLW file), in the same repository.
Several jobs define the pipeline. Each job performs a task:
The Azure pipeline definition, a YAML file, defines the tasks, their order, where they should run and when.
You can view and change this YAML file directly from SAS Studio.
The trigger type in the pipeline definition sets when the pipeline will start. For instance, every time you push a change to the main branch of the Git repository.
The pipeline runs on a self-hosted agent, a Virtual Machine, which can communicate with the SAS Viya deployment. More about agents in a future post.
The pipeline uses SAS-VIYA CLI (Command Line Interface) to interact with SAS Viya:
To run the SAS programs: sas-viya batch jobs submit-pgm
.
To import the SAS studio flow: sas-viya transfer import
.
To run the SAS studio flow: sas-viya job requests execute
.
For the flow to run, it needs a job request. The easiest way to generate a job request is to schedule the job request. If you change the SAS Studio Flow, do not forget to re-schedule it, to get a new job request. Work is in progress for a REST API to run flows directly from the SAS code they generate.
What can you achieve with such a pipeline? You can:
The post demonstrated a SAS Viya and Azure DevOps pipeline. The pipeline ran data management tasks in SAS Viya. All the pipeline code was stored in a Git repository (Azure Repos). The pipeline interacts with SAS Viya through the SAS Viya CLI. The post ended with an open discussion, when and why you might use SAS Viya and Azure Pipelines for data management tasks.
In a next post, we will look closer at a SAS Viya model release pipeline with Azure DevOps.
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
Thank you for your time reading this post. If you liked the post, give it a thumbs up! Please comment and tell us what you think about this topic. If you wish to get more information, please write me an email.
Find more articles from SAS Global Enablement and Learning here.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.