{"id":9295,"library":"sas-airflow-provider","title":"SAS Airflow Provider","description":"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.","status":"active","version":"0.0.23","language":"python","source_language":"en","source_url":"https://github.com/sassoftware/sas-airflow-provider","tags":["airflow","sas","etl","data-orchestration","provider","viya"],"install":[{"cmd":"pip install sas-airflow-provider","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"This is an Airflow provider, requiring Apache Airflow to function.","package":"apache-airflow","optional":false},{"reason":"Requires Python 3.7 or newer.","package":"python","optional":false}],"imports":[{"wrong":"from sas_airflow_provider.operators.sas_studio import SASStudioOperator","symbol":"get_provider_info","correct":"from sas_airflow_provider import get_provider_info"}],"quickstart":{"code":"import pendulum\nfrom airflow.models.dag import DAG\nfrom sas_airflow_provider.operators.sas_studio import SASStudioOperator\nimport os\n\n# NOTE: For a real deployment, configure your SAS connection in the Airflow UI.\n# (Admin -> Connections, Connection Id: 'sas_default', Connection Type: 'SAS')\n# Fill in Host, Login, Password or use 'Extra' JSON for OAuth token.\n# Example 'Extra' for OAuth: {\"token\": \"your_oauth_token_here\"}\n# Or for global variable: {\"token_variable\": \"airflow_variable_name\"}\n# The connection below is for demonstration if env vars are used for local testing.\n\n# Mock environment variables for connection for local testing (NOT PRODUCTION BEST PRACTICE)\nos.environ['AIRFLOW_CONN_SAS_DEFAULT'] = (\n    'sas://' + \n    os.environ.get('SAS_DEFAULT_LOGIN', 'user') + \n    ':' + \n    os.environ.get('SAS_DEFAULT_PASSWORD', 'password') + \n    '@' + \n    os.environ.get('SAS_DEFAULT_HOST', 'https://your-sas-viya-host.com')\n)\n\nwith DAG(\n    dag_id=\"sas_studio_flow_example\",\n    start_date=pendulum.datetime(2023, 1, 1, tz=\"UTC\"),\n    catchup=False,\n    schedule=None,\n    tags=[\"sas\", \"studio\", \"example\"],\n) as dag:\n    run_my_sas_flow = SASStudioOperator(\n        task_id=\"run_sas_studio_flow_task\",\n        path=\"/Public/my_airflow_test_flow\", # Replace with your actual SAS Studio Flow path\n        connection_id=\"sas_default\",\n        exec_type=\"flow\", # Can also be 'program' for SAS programs\n        # Optional: pass macro variables to the flow\n        # macro_variables={\"input_param\": \"airflow_value\"},\n        # Optional: retrieve SAS logs to Airflow\n        # job_exec_log=True,\n    )\n","lang":"python","description":"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."},"warnings":[{"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.","message":"The `SASStudioFlowOperator` is deprecated. Users should migrate to `SASStudioOperator` for all SAS Studio flow and program executions. New features will only be added to `SASStudioOperator`.","severity":"deprecated","affected_versions":"<0.0.5"},{"fix":"Set the `NO_PROXY='*'` environment variable before running Airflow in standalone mode on macOS. Example: `export NO_PROXY=\"*\"`.","message":"When running Airflow standalone on macOS, you might encounter issues with `urllib` and process forking. This can lead to connection problems with the SAS provider.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"SAS 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.","severity":"breaking","affected_versions":"All versions"},{"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.","message":"Storing sensitive information (passwords, tokens) directly in Airflow connections carries security risks. Airflow connections are stored in the metadata database, which needs to be secured.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'0.0.23':49 'activ':54 'address':59 'airflow':2,6,10,44,64 'allow':35 'apach':9 'asset':34 'creat':13 'current':46 'dag':45 'data':68 'data-orchestr':67 'develop':55 'enabl':8 'environ':26 'etl':66 'execut':16 'featur':61 'flow':19 'frequent':57 'improv':63 'interact':31 'job':21 'librari':51 'monitor':39 'new':60 'oper':29 'orchestr':37,69 'process':42 'provid':3,7,28,70 'sas':1,5,17,24,33,41,65 'studio':18 'task':14 'updat':58 'user':11 'version':48 'viya':25,71 'within':43","created_at":"2026-04-16T18:49:28.661491+00:00","updated_at":"2026-04-16T18:49:28.661491+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.0.24","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/sassoftware/sas-airflow-provider","docs":null,"changelog":null,"pypi":"https://pypi.org/project/sas-airflow-provider/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["workflow","devops","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}