align:rightalign:right

SASjs

DevOps for SAS

align:rightalign:right

Workshop Prep

align:rightalign:right

Challenges with Traditional SAS Projects

  • Scattered Artefacts > Hard to navigate - changes are lost
  • Shared Environment > Edits affect everyone
  • Single Server > Migration Management

🤬🤬🤬 The absence of a standardised framework makes for inconsistent project delivery and on-boarding struggles for new developers

align:rightalign:right

Why use SASjs?

  • Open source - use everywhere
  • Faster iterations / time to value
  • Work locally with your preferred tools
align:rightalign:right

What is SASjs?

  1. An Opinionated Approach for SAS Solution Delivery
  2. A Collection of Tools
align:rightalign:right

SASjs Workflow

align:rightalign:right

SASjs Projects

  • Push to Any or Many > Server Agnostic
  • Centralised Artefacts > Source Controlled
  • Isolated Developer Environments > Move Fast and Break Things

✅ Highly suitable where SAS Programming is involved
❌ Needs additional work for graphical artefacts (VA, Flows etc)

align:rightalign:right

Why Do SAS Admins ❤️ It?

  • Nothing to install or provision on the SAS server
  • No SSH nor special permissions needed anywhere
  • Nothing to configure, except:
    • Optional: Access to the target folder
    • Optional: Client / Secret (Viya)
    • Optional: SAS 9 setting for encoded passwords
align:rightalign:right

Why Do Project Leads ❤️ It?

  • Faster to on-board new developers
  • Ability to work on multiple features in parallel
  • Complete visibility of what is being developed
align:rightalign:right

SASjs Config File

Every SASjs Project has a sasjs/sasjsconfig.json file, for configuration of:

  • Location of Artefacts (+ Dependencies & Init/Term programs)
  • Macro Variables
  • Target attributes / connection settings
align:rightalign:right

🎯 SASjs Target 🎯

A location on a SAS server

Core attributes:

  • name > Alias for SASjs commands, eg: sasjs deploy -t dev3
  • serverUrl > Protocol + Host + Port
  • serverType > either SASVIYA, SAS9 or SASJS
  • appLoc > Root deployment folder in SAS Drive or Metadata
align:rightalign:right

Running SAS

  • sasjs run > Execute arbitrary SAS code
  • sasjs job execute > Run a Job
  • sasjs flow execute > Run a collection of Jobs

But - how to run a remote job with local macros???

align:rightalign:right

Compilation - Scaffolding Consistency

verticalverticalvertical

align:rightalign:right

Compilation Components

Targets are compiled by reference to the dependencies listed in the program header.

  • Artefacts: Jobs, Services, Tests
  • Dependencies: Macros, Includes, Binary Files
  • Optional Frontend - convert a web project into a streaming app.
align:rightalign:right

sasjs cbd

  • sasjs compile > Self-contained Jobs, Services & Tests
  • sasjs build > Deployment pack (JSON / SAS Program)
  • sasjs deploy > Send to target location
align:rightalign:right

Being a Responsible Developer

  • sasjs test > Trigger one or more Tests
  • sasjs lint > Check Code Quality / Best Practices
  • sasjs doc > Generate docs (+ lineage) from program headers

More commands at https://cli.sasjs.io

align:rightalign:right

CLI Pre-Requisites

Required Recommended Recommended
vertical border-style:solid vertical vertical

To install the CLI: npm i -g @sasjs/cli

align:rightalign:right

Demo

sasjs lint
sasjs doc
sasjs auth
sasjs cbd
sasjs test
sasjs run
sasjs job execute

align:rightalign:right

Resources

* MIT licence, no restrictions. Any version of SAS * Single command to deploy to a server, one more to run the tests. Share config between developers. * VS Code has a plugin but the CLI can also do everything.

optionated - working locally, git centric, server agnostic