Distibuted dbt runs on Apache Airflow
Project description
dmp-af: distributed dbt runs on Airflow
Overview
dmp-af runs your dbt models in parallel on Airflow. Each model becomes an independent task while preserving dependencies across domains.
Built for scale. Designed for large dbt projects (1000+ models) and data mesh architecture. Works with any project size.
Why dmp-af?
- Domain-driven architecture - Separate models by domain into different DAGs, run in parallel, perfect for data mesh
- dbt-first design - All configuration in dbt model configs, analytics teams stay in dbt, no Airflow knowledge required
- Flexible scheduling - Multiple schedules per model (
@hourly,@daily,@weekly,@monthly, and more) - Enterprise features - Multiple dbt targets, configurable test strategies, built-in maintenance, Kubernetes support
Installation
To install dmp-af run pip install dmp-af.
To contribute we recommend to use uv to install package dependencies.
Run uv sync --all-packages --all-groups --all-extras to install all dependencies.
dmp-af by Example
All tutorials and examples are located in the examples folder.
To get basic Airflow DAGs for your dbt project, you need to put the following code into your dags folder:
# LABELS: dag, airflow (it's required for airflow dag-processor)
from dmp_af.dags import compile_dmp_af_dags
from dmp_af.conf import Config, DbtDefaultTargetsConfig, DbtProjectConfig
# specify here all settings for your dbt project
config = Config(
dbt_project=DbtProjectConfig(
dbt_project_name='my_dbt_project',
dbt_project_path='/path/to/my_dbt_project',
dbt_models_path='/path/to/my_dbt_project/models',
dbt_profiles_path='/path/to/my_dbt_project',
dbt_target_path='/path/to/my_dbt_project/target',
dbt_log_path='/path/to/my_dbt_project/logs',
dbt_schema='my_dbt_schema',
),
dbt_default_targets=DbtDefaultTargetsConfig(default_target='dev'),
dry_run=False, # set to True if you want to turn on dry-run mode
)
dags = compile_dmp_af_dags(
manifest_path='/path/to/my_dbt_project/target/manifest.json',
config=config,
)
for dag_name, dag in dags.items():
globals()[dag_name] = dag
In dbt_project.yml you need to set up default targets for all nodes in your project (see example):
sql_cluster: "dev"
daily_sql_cluster: "dev"
py_cluster: "dev"
bf_cluster: "dev"
This will create Airflow DAGs for your dbt project.
Check out the documentation for more details here.
Key Features
Auto-generated DAGs
- Automatically creates Airflow DAGs from your dbt project
- Organizes by domain and schedule
- Handles dependencies across domains
Idempotent runs
- Each model is a separate Airflow task
- Date intervals passed to every run
- Reliable backfills and reruns
Team-friendly
- Analytics teams stay in dbt
- No Airflow DAG writing required
- Infrastructure handled automatically
Requirements
dmp-af is tested with:
| Airflow version | Python versions | dbt-core versions |
|---|---|---|
| 2.6.3 | >=3.10,<3.12 | >=1.7,<=1.10 |
| 2.7.3 | >=3.10,<3.12 | >=1.7,<=1.10 |
| 2.8.4 | >=3.10,<3.12 | >=1.7,<=1.10 |
| 2.9.3 | >=3.10,<3.13 | >=1.7,<=1.10 |
| 2.10.5 | >=3.10,<3.13 | >=1.7,<=1.10 |
| 2.11.0 | >=3.10,<3.13 | >=1.7,<=1.10 |
| 3.0.6 | ≥3.10,<3.13 | ≥1.7,≤1.10 |
Project Information
About this fork
This project is a fork of Toloka AI BV's original repository. It includes substantial modifications by IJKOS & PARTNERS LTD. This fork is not affiliated with or endorsed by Toloka AI BV.
The original project is licensed under the Apache License 2.0.
Migrating from dbt-af
If you're currently using dbt-af and want to migrate to dmp-af, see our Migration Guide for step-by-step instructions.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dmp_af-0.15.0.tar.gz.
File metadata
- Download URL: dmp_af-0.15.0.tar.gz
- Upload date:
- Size: 43.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2467e57e4fae4b91a8dfff3afcf2e9679cbfcd418ae7474f8b45cb0b5227af4
|
|
| MD5 |
2f59e3407f86fcbfaf2a698fc8876414
|
|
| BLAKE2b-256 |
f0dbb6c9048006ed2b4e2de8290c74e482fed08ad0be5713da8a3b9f97343713
|
Provenance
The following attestation bundles were made for dmp_af-0.15.0.tar.gz:
Publisher:
semantic-release.yml on dmp-labs/dmp-af
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dmp_af-0.15.0.tar.gz -
Subject digest:
d2467e57e4fae4b91a8dfff3afcf2e9679cbfcd418ae7474f8b45cb0b5227af4 - Sigstore transparency entry: 650421533
- Sigstore integration time:
-
Permalink:
dmp-labs/dmp-af@978db8302547230a9106bb171ad8597bcb5238e7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dmp-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
semantic-release.yml@978db8302547230a9106bb171ad8597bcb5238e7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file dmp_af-0.15.0-py3-none-any.whl.
File metadata
- Download URL: dmp_af-0.15.0-py3-none-any.whl
- Upload date:
- Size: 56.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52e14793dc6f95b7d35c06677f91deca9aef42a68c78b00a8bbbe86b6af0ab85
|
|
| MD5 |
935404257712c431c64af31948ff07d1
|
|
| BLAKE2b-256 |
70c44618b3959da8114f6fd65f31799de44dee72ba09360f19229664892d2569
|
Provenance
The following attestation bundles were made for dmp_af-0.15.0-py3-none-any.whl:
Publisher:
semantic-release.yml on dmp-labs/dmp-af
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dmp_af-0.15.0-py3-none-any.whl -
Subject digest:
52e14793dc6f95b7d35c06677f91deca9aef42a68c78b00a8bbbe86b6af0ab85 - Sigstore transparency entry: 650421560
- Sigstore integration time:
-
Permalink:
dmp-labs/dmp-af@978db8302547230a9106bb171ad8597bcb5238e7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dmp-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
semantic-release.yml@978db8302547230a9106bb171ad8597bcb5238e7 -
Trigger Event:
workflow_dispatch
-
Statement type: