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-providerVerified import paths — ran on the pinned version, not inferred.
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.
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.
Set the `NO_PROXY='*'` environment variable before running Airflow in standalone mode on macOS. Example: `export NO_PROXY="*"`.
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.
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.