Registry / workflow / sas-airflow-provider

sas-airflow-provider

JSON →
library0.0.24pypypi✓ verified 82d ago

The SAS Airflow Provider enables Apache Airflow users to create tasks for executing SAS Studio Flows and Jobs on a SAS Viya environment. It provides operators to interact with SAS assets, allowing for orchestration and monitoring of SAS processes within Airflow DAGs. Currently at version 0.0.23, the library is under active development with frequent updates addressing new features and improvements.

pip install sas-airflow-provider
INSTALL
IMPORT
SIG · SAS-AIRFLOW-PROVID
S
sas-airflow-provider
workflowpythonv0.0.24
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.24 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_provider_info
from sas_airflow_provider import get_provider_info
from sas_airflow_provider.operators.sas_studio import SASStudioOperator

This quickstart demonstrates how to define a simple Airflow DAG using the `SASStudioOperator` to execute a SAS Studio Flow. Before running, you must configure a 'SAS' connection in the Airflow UI (Admin -> Connections) with `Connection Id` set to `sas_default`, providing your SAS Viya host, login, and password, or an OAuth token in the 'Extra' JSON field. For local testing, mock environment variables are included, but this is not recommended for production.

import pendulum from airflow.models.dag import DAG from sas_airflow_provider.operators.sas_studio import SASStudioOperator import os # NOTE: For a real deployment, configure your SAS connection in the Airflow UI. # (Admin -> Connections, Connection Id: 'sas_default', Connection Type: 'SAS') # Fill in Host, Login, Password or use 'Extra' JSON for OAuth token. # Example 'Extra' for OAuth: {"token": "your_oauth_token_here"} # Or for global variable: {"token_variable": "airflow_variable_name"} # The connection below is for demonstration if env vars are used for local testing. # Mock environment variables for connection for local testing (NOT PRODUCTION BEST PRACTICE) os.environ['AIRFLOW_CONN_SAS_DEFAULT'] = ( 'sas://' + os.environ.get('SAS_DEFAULT_LOGIN', 'user') + ':' + os.environ.get('SAS_DEFAULT_PASSWORD', 'password') + '@' + os.environ.get('SAS_DEFAULT_HOST', 'https://your-sas-viya-host.com') ) with DAG( dag_id="sas_studio_flow_example", start_date=pendulum.datetime(2023, 1, 1, tz="UTC"), catchup=False, schedule=None, tags=["sas", "studio", "example"], ) as dag: run_my_sas_flow = SASStudioOperator( task_id="run_sas_studio_flow_task", path="/Public/my_airflow_test_flow", # Replace with your actual SAS Studio Flow path connection_id="sas_default", exec_type="flow", # Can also be 'program' for SAS programs # Optional: pass macro variables to the flow # macro_variables={"input_param": "airflow_value"}, # Optional: retrieve SAS logs to Airflow # job_exec_log=True, )
Debug
Known issues
deprecatedThe `SASStudioFlowOperator` is deprecated. Users should migrate to `SASStudioOperator` for all SAS Studio flow and program executions. New features will only be added to `SASStudioOperator`.
fix
Replace `SASStudioFlowOperator` with `SASStudioOperator` in your DAG definitions. Adjust parameters as necessary, noting that `SASStudioOperator` supports both flows and programs via the `exec_type` parameter.
affects: <0.0.5
gotchaWhen running Airflow standalone on macOS, you might encounter issues with `urllib` and process forking. This can lead to connection problems with the SAS provider.
fix
Set the `NO_PROXY='*'` environment variable before running Airflow in standalone mode on macOS. Example: `export NO_PROXY="*"`.
affects: All versions
breakingSAS connection issues (e.g., 'Connection reset by peer') for long-running jobs are often caused by WAF/firewall timeouts or network load balancers terminating idle TCP connections. TCP keep-alive settings may not be sufficient for all network configurations.
fix
Investigate network configuration (WAF, firewalls, load balancers) for idle timeout settings. Consider re-architecting long-running SAS jobs to be initiated in the background, with Airflow separately polling for status and retrieving results to maintain active communication. Ensure relevant IPs are whitelisted in firewalls.
affects: All versions
gotchaStoring sensitive information (passwords, tokens) directly in Airflow connections carries security risks. Airflow connections are stored in the metadata database, which needs to be secured.
fix
Consult Airflow's security documentation. Utilize secrets backend integrations (e.g., HashiCorp Vault, AWS Secrets Manager) for production environments to manage credentials securely, or leverage the `token_variable` field in the connection's extra JSON to retrieve access tokens from global Airflow variables.
affects: All versions
Upgrade
Version history
0.0.24latest on PyPI · released Jun 2, 2026
Audit
Dependencies
apache-airflowrequiredThis is an Airflow provider, requiring Apache Airflow to function.
pythonrequiredRequires Python 3.7 or newer.
Agent activity
25 hits · last 30 days
node
20
Bingbot
1
OpenAI (training)
1
Resources