dbt-dagsterizer
dbt-dagsterizer is a Python package for building Dagster automation from dbt metadata.
It is designed to keep Dagster code locations mostly static, while letting developers declare orchestration intent in a small, reviewable YAML file alongside the dbt project.
Two common ways to use it
- As a CLI tool (bootstrap + maintain
dagsterization.yml)
- Install once:
uv tool install dbt-dagsterizer
- Upgrade later:
uv tool upgrade dbt-dagsterizer
This is the recommended workflow for running dbt-dagsterizer project ..., dbt-dagsterizer meta ..., and dbt-dagsterizer macros ... from any repo.
- As a Python dependency (Dagster runtime imports it)
Dagster code locations typically import dbt_dagsterizer at runtime (for example build_definitions()), so the Dagster project itself must depend on dbt-dagsterizer (for example in its own pyproject.toml). Installing the CLI as a tool does not automatically make it importable inside that project’s runtime environment/container.
Documentation
- Docs index: docs/README.md
- Getting started: docs/getting-started.md
- CLI reference: docs/concepts/cli.md
- Execution model and env propagation: docs/concepts/execution-model.md
- Release notes: RELEASE_NOTES.md
- Template docs (Dagster + dbt + StarRocks): docs/templates/.../README.md
Quick start
CLI
dbt-dagsterizer --help
Initialize orchestration intent and refresh the dbt manifest:
dbt-dagsterizer meta init --parse
dbt-dagsterizer meta validate --prepare
Python
from dbt_dagsterizer.api import build_definitions
defs = build_definitions(dbt_project_dir="./dbt_project")
If the project has no dbt models yet (no models/**/*.sql), build_definitions() still returns a minimal, always-loadable Definitions.
Kubernetes run pod env injection
When using Dagster’s K8sRunLauncher, runs execute in separate Kubernetes Job pods. If your Dagster code-location Deployment uses envFrom (for example a per-code-location ConfigMap/Secret containing DBT/StarRocks credentials), those variables do not automatically propagate into run pods.
To inject a code-location ConfigMap/Secret into run pods created by jobs defined in dbt-dagsterizer, set these environment variables on the code server Deployment:
LUBAN_RUN_ENV_CONFIGMAP={{app_name}}-config(optional)LUBAN_RUN_ENV_SECRET={{app_name}}-secret(optional)
This adds a per-job dagster-k8s/config tag that configures container_config.envFrom for the run pod container. If both variables are unset/empty, no tag is added.
Notes:
- The referenced ConfigMap/Secret must exist in the same Kubernetes namespace where the run pod is launched.
- If you explicitly set a
dagster-k8s/configtag on a job, it takes precedence over this env-based injection. - If you use an executor that launches steps in their own pods (for example
k8s_job_executor), job-level configuration may not apply to step pods.
Development
This section is for developing dbt-dagsterizer itself. If you are using it in another repo, start with the CLI install instructions or add it as a dependency in your Dagster code location.
Setup:
uv sync --dev
Run tests:
uv run pytest
Lint:
uv run ruff check .
Metadata
Release files for dbt-dagsterizer 0.5.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dbt_dagsterizer-0.5.4.tar.gz | 211.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dbt_dagsterizer-0.5.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 394.9 kB
Release files / dbt_dagsterizer-0.5.4.tar.gz
| Download URL | dbt_dagsterizer-0.5.4.tar.gz |
|---|---|
| Size | 211.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
359d16ce188839ddc91252ecd36076fe2e1969b94127202fb3499682faa838f4
|
|
BLAKE2b-256 checksum How to use checksums |
1fdcf38c8f81f188649aa3f4fef58f93ab493e244122ed32fff4a737aa29ae35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Release files / dbt_dagsterizer-0.5.4-py3-none-any.whl
| Download URL | dbt_dagsterizer-0.5.4-py3-none-any.whl |
|---|---|
| Size | 183.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c91b2ceb7f4cb8a405ecd7bd55c0394e613f336a5266a9e07774c8bf86c61a2
|
|
BLAKE2b-256 checksum How to use checksums |
e2e8faf1231977d518a9d5ccf0ac49b7e52912bbfb48d3d82a732b4f49ed9930
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|