Back to integrations
Orchestrate your dbt transformation steps

Orchestrate your dbt transformation steps

Put your dbt transformations to work, directly from within Dagster.

About this integration

This library provides a Dagster integration with dbt so that you can orchestrate dbt transformations alongside other technologies, so you can combine dbt with Spark, Python, etc. in a single workflow.

Dagster's software-defined asset abstractions make it simple to define data assets that depend on specific dbt models, or to define the computation required to compute the sources that your dbt models depend on.

You could, for example:

  • Run a dbt model immediately after ingesting data into your data warehouse
  • Selectively materialize dbt models and their dependencies

Dagster has built-in support for loading dbt models, seeds, and snapshots as software-defined assets, enabling you to:

  • Visualize and orchestrate a graph of dbt assets, and execute them with a single dbt invocation
  • View detailed historical metadata and logs for each asset
  • Define Python computations that depend directly on tables updated using dbt
  • Track data lineage through dbt and your other tools

Installation

pip install dagster-dbt

Example

from dagster_dbt import load_assets_from_dbt_project

dbt_assets = load_assets_from_dbt_project(
  "path/to/dbt_project",
  profiles_dir="path/to/profiles"
)

About dbt

dbt is a SQL-first transformation workflow that lets teams quickly and collaboratively deploy analytics code following software engineering best practices like modularity, portability, CI/CD, and documentation.