{"id":5745,"library":"airflow-dbt","title":"Airflow dbt Integration (GoCardless)","description":"airflow-dbt is a Python package that provides Apache Airflow operators for integrating with dbt (data build tool). It allows users to orchestrate dbt commands like `seed`, `snapshot`, `run`, and `test` within Airflow DAGs by wrapping the dbt CLI. This package, currently at version 0.4.0, offers a foundational way to embed dbt transformations into Airflow workflows, with its last update in September 2021.","status":"maintenance","version":"0.4.0","language":"python","source_language":"en","source_url":"https://github.com/gocardless/airflow-dbt","tags":["airflow","dbt","etl","data-orchestration","transformation"],"install":[{"cmd":"pip install airflow-dbt","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for dbt CLI functionality; needs to be installed separately and accessible in the Airflow environment's PATH.","package":"dbt-core","optional":false},{"reason":"A dbt adapter (e.g., dbt-postgres, dbt-snowflake) matching your data warehouse is required by dbt-core for database connectivity.","package":"dbt-<adapter>","optional":false}],"imports":[{"wrong":"from airflow_dbt import DbtSeedOperator","symbol":"DbtSeedOperator","correct":"from airflow_dbt.operators import DbtSeedOperator"}],"quickstart":{"code":"from airflow import DAG\nfrom airflow_dbt.operators.dbt_operator import (\n    DbtSeedOperator,\n    DbtSnapshotOperator,\n    DbtRunOperator,\n    DbtTestOperator\n)\nfrom airflow.utils.dates import days_ago\nimport os\n\ndefault_args = {\n    'dir': os.environ.get('DBT_PROJECT_DIR', '/path/to/your/dbt/project'),\n    'start_date': days_ago(0)\n}\n\nwith DAG(\n    dag_id='dbt_example_dag',\n    default_args=default_args,\n    schedule_interval='@daily',\n    tags=['dbt', 'example']\n) as dag:\n    dbt_seed = DbtSeedOperator(\n        task_id='dbt_seed',\n        profiles_dir=os.environ.get('DBT_PROFILES_DIR', '/path/to/your/.dbt') # Optional\n    )\n\n    dbt_snapshot = DbtSnapshotOperator(\n        task_id='dbt_snapshot'\n    )\n\n    dbt_run = DbtRunOperator(\n        task_id='dbt_run'\n    )\n\n    dbt_test = DbtTestOperator(\n        task_id='dbt_test',\n        retries=0 # Failing tests should fail the task, not retry\n    )\n\n    dbt_seed >> dbt_snapshot >> dbt_run >> dbt_test\n","lang":"python","description":"This quickstart demonstrates how to define a basic Airflow DAG using `airflow-dbt` operators to run a sequence of dbt commands: `seed`, `snapshot`, `run`, and `test`. Ensure your dbt project directory and profiles directory (if not default) are correctly specified, typically via environment variables or directly in the `dir` and `profiles_dir` arguments. The dbt CLI must be installed and accessible on the Airflow worker's PATH."},"warnings":[{"fix":"Ensure `dbt-core` and its relevant adapter are installed in your Airflow environment and that the `dbt` command is accessible from the Airflow worker processes. For managed services, this often means including it in `requirements.txt` and potentially configuring environment variables or plugins.","message":"This package relies on wrapping the dbt CLI. This means the dbt executable must be installed and available on the Airflow worker's PATH or explicitly set via the `dbt_bin` argument. This can be a common point of failure, especially in managed Airflow environments like AWS MWAA or GCP Cloud Composer, where managing CLI tools requires specific configurations.","severity":"gotcha","affected_versions":"<=0.4.0"},{"fix":"Review the operator's source code for supported arguments. If a required argument is missing, you might need to use Airflow's `BashOperator` to execute dbt commands directly, or consider alternatives like `airflow-dbt-python` for more comprehensive dbt integration without CLI dependency.","message":"The operators may not expose the full range of arguments available in the dbt CLI commands. For example, `DbtRunOperator` might not have an explicit `fail_fast` attribute, limiting granular control over dbt execution parameters directly from Airflow.","severity":"gotcha","affected_versions":"<=0.4.0"},{"fix":"For workflows requiring dbt artifact access, consider custom solutions using the `BashOperator` to read files from the dbt project's `target/` directory, or explore alternative integration packages that provide artifact parsing and XCom capabilities.","message":"This package does not offer direct access to dbt artifacts (e.g., `manifest.json`, `run_results.json`) generated during execution. This limitation prevents more advanced use cases such as dynamic DAG generation based on dbt's lineage or pushing artifacts to Airflow XComs for downstream processing.","severity":"gotcha","affected_versions":"<=0.4.0"},{"fix":"Thoroughly test compatibility with your specific Airflow and dbt-core versions before deployment. Consider migrating to more actively maintained alternatives like `airflow-dbt-python` (github.com/tomasfarias/airflow-dbt-python) or `dbt-airflow` (github.com/gmyrianthous/dbt-airflow) which offer more recent updates and potentially address these compatibility concerns.","message":"The package has not received updates since September 2021 (v0.4.0), making it potentially incompatible with newer versions of Apache Airflow (e.g., Airflow 2.10+) or dbt-core (e.g., dbt-core 1.8+), which may introduce breaking changes or new features not supported by this older integration. For instance, `dbt-common`'s `isodate` constraint can conflict with Airflow 2.10.3+.","severity":"deprecated","affected_versions":"All versions (<=0.4.0) with Airflow 2.10+ or dbt-core 1.8+"}],"env_vars":null,"search_vec":"'0.4.0':50 '2021':68 'airflow':1,6,15,38,60,69 'airflow-dbt':5 'allow':25 'apach':14 'build':22 'cli':44 'command':30 'current':47 'dag':39 'data':21,73 'data-orchestr':72 'dbt':2,7,20,29,43,57,70 'emb':56 'etl':71 'foundat':53 'gocardless':4 'integr':3,18 'last':64 'like':31 'offer':51 'oper':16 'orchestr':28,74 'packag':11,46 'provid':13 'python':10 'run':34 'seed':32 'septemb':67 'snapshot':33 'test':36 'tool':23 'transform':58,75 'updat':65 'user':26 'version':49 'way':54 'within':37 'workflow':61 'wrap':41","created_at":"2026-04-14T05:05:09.331020+00:00","updated_at":"2026-04-15T19:46:15.942098+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmpurumk5df/venv/lib/python3.12/site-packages/airflow_dbt/__init__.py\", line 1, in <module>\n    from .hooks import DbtCliHook\n  File \"/tmp/tmpurumk5df/venv/lib/python3.12/site-packages/airflow_dbt/hooks/__init__.p"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.4.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/gocardless/airflow-dbt","docs":null,"changelog":null,"pypi":"https://pypi.org/project/airflow-dbt/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["workflow","data","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}