Here provides examples of how to use
dagster-dbt to integrate your existing
with the Dagster platform.
These examples illustrate how custom solids can be combined with dbt commands in a Dagster pipeline.
Make sure you have the necessary Python libraries installed. Running inside a Python virtualenv is recommended.
pip install -e .
The example dbt project requires a running Postgres database. By default, the project will attempt to connect to
postgresql://dbt_example:dbt_example@localhost:5432/dbt_example. If you are running Docker, have Docker Compose installed, and aren't running any other process bound to port 5432, you can bring up a default database with this address by running:
docker-compose up -d
If you'd like to run the project against a different running database, set the environment variables
Add the profile for the 'dbt_example_project' to your dbt 'profiles.yml' file.
mkdir -p ~/.dbt/ touch ~/.dbt/profiles.yml cat dbt_example_project/profiles.yml >> ~/.dbt/profiles.yml
Test that this is correctly setup by running
dbt ls --project-dir dbt_example_project
$ dagit -m dbt_example