Tutorial: Using dbt with Dagster#

Using dbt Cloud? Check out the dbt Cloud with Dagster guide!

In this tutorial, we'll walk you through integrating dbt with Dagster using a smaller version of dbt's example jaffle shop project, the dagster-dbt library, and a data warehouse, such as DuckDB.

By the end of this tutorial, you'll have your dbt models represented in Dagster along with other Dagster Software-defined Assets upstream and downstream of them:

Asset group with dbt models and Python asset

To get there, you will:


To complete this tutorial, you'll need:

  • To have git installed. If it's not installed already (find out by typing git in your terminal), you can install it using the instructions on the git website.

  • To install dbt, Dagster, and the Dagster webserver/UI. Run the following to install everything using pip:

    pip install dagster-dbt dagster-webserver dbt-duckdb

    The dagster-dbt library installs both dbt-core and dagster as dependencies. dbt-duckdb is installed as you'll be using DuckDB as a database during this tutorial. Refer to the dbt and Dagster installation docs for more info.

Ready to get started?#

When you've fulfilled all the prerequisites for the tutorial, you can get started by setting up the dbt project.