Getting started¶
Five-minute walkthrough: wire a dbt project to a single Glue Spark Job runner and run it from Airflow.
Prerequisites¶
- An AWS account with permissions to create Glue Jobs and read/write S3
- An IAM role that Glue can assume (e.g.
AWSGlueServiceRole) - A dbt project (any adapter — local DuckDB works fine for testing)
- Apache Airflow 3.x
1. Install¶
The lib is published on PyPI (real PyPI publish coming):
Or in a uv-managed project:
The Glue workers install the same wheel by passing the PyPI extra index URL
in the Glue Job's --python-modules-installer-option default argument
(handled automatically by the runner).
2. Generate your dbt manifest¶
The lib reads the dbt graph from target/manifest.json (or runs dbt parse to produce
one). Generate it once:
3. Wire the DAG¶
Drop this into your Airflow dags_folder:
4. Trigger it¶
What happens:
- Airflow imports the DAG file.
build_and_upload_project_archiveuploads the dbt project archive tos3://my-glue-bucket/dbt-aws/archives/<sha256>.tar.gz(idempotent). - The dbt manifest is parsed; each model/seed/test becomes a separate Airflow task.
- Each task:
glue:CreateJob(orUpdateJobif it exists) →glue:StartJobRun→airflow.deferon a custom trigger that polls the Glue Job run state. - On the Glue worker:
pip install runner-dbt-aws-airflow ..., download the project archive, rundbt run --select <model_name>.
You'll see one log link per task pointing at the Glue Job run page in the AWS console.
5. Next steps¶
- Concepts → Runners: the five runner shapes and when to pick each.
- Concepts → Routing: tag-based bulk routing + per-node escape hatches.
- How-to → Multi-runner mix: run different layers on different runners in one DAG.
- Reference → YAML config: declare runners in a
.ymlfile instead of Python.