Skip to main content

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

  1. 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.

  1. 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

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/config tag 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 .

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt_dagsterizer-0.3.2.tar.gz (93.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_dagsterizer-0.3.2-py3-none-any.whl (134.1 kB view details)

Uploaded Python 3

File details

Details for the file dbt_dagsterizer-0.3.2.tar.gz.

File metadata

  • Download URL: dbt_dagsterizer-0.3.2.tar.gz
  • Upload date:
  • Size: 93.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for dbt_dagsterizer-0.3.2.tar.gz
Algorithm Hash digest
SHA256 de861e1dcf335dd8b8520c913b2ceff5ccc81739f31972532746981756d65a34
MD5 5b23af2523f88c7c0170a0029162fb62
BLAKE2b-256 0625a615f5b5a2329bbb7cf45644aae433188af83c6d7b1151bb3d2c4e972950

See more details on using hashes here.

File details

Details for the file dbt_dagsterizer-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dbt_dagsterizer-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 117f620e918543b255c1f454f933af3dfd9ec04798dd0899a28fa2710c661fc4
MD5 a98e7e0448c4c8d8903e1785b77bfea1
BLAKE2b-256 228032916c563ed15ea0ace90983c9d4fd9a3d1a81a5c583a571c2ea8ce07628

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.3

2 files

This release

0.3.2 This release

2 files

0.3.1

2 files

0.2.4

2 files

0.2.3

2 files

0.2.1

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page