Hey all, I’m following the <Dagster + dbt tutorial...
# integration-dbt
j
Hey all, I’m following the Dagster + dbt tutorial and when I’m trying to materialize my dbt models I’m hitting this error. Any ideas? I cannot seem to make progress on it:
Copy code
2023-08-01 12:57:35 -0500 - dagster - INFO - __ASSET_JOB - 2b4aabf7-7fdc-4eef-8c97-6d4fffc1de15 - run_dbt_06e5b - Running dbt command: `dbt build --select jaffle_shop.stg_customers`.
Running with dbt=1.5.4
Encountered an error:
Runtime Error
  Could not find profile named 'jaffle_shop'
j
Yes, here’s my
profiles.yml
located at
tutorial_template/config/
Copy code
## Refer to Using dbt with Dagster, part one for info about this file:
## <https://docs.dagster.io/integrations/dbt/using-dbt-with-dagster/part-one#step-2-create-a-duckdb-profile>
jaffle_shop:
  target: local
  outputs:
    local:
      type: duckdb
      path: tutorial.duckdb
      schema: jaffle_shop
Running
dbt debug --profiles-dir config
in the
jaffle_shop
directory returns “All checks passed!”
r
This might be an oversight since we switched to
DbtCliResource
. Could you do the following? • move
profiles.yml
to
tutorial_template/jaffle_shop
(not
tutorial_template/jaffle_shop/config
) • When loading the assets, do the following:
Copy code
dbt_assets = load_assets_from_dbt_project(project_dir=DBT_PROJECT_PATH, profiles_dir=DBT_PROJECT_PATH, key_prefix=["jaffle_shop"])
j
should I change the
profiles_dir
on the
DbtCliResource
too?
r
DbtCliResource
doesn’t have a
profiles_dir
argument.
j
typo in docs?
r
Yeah that’s incorrect. Sorry for the trouble here, we’re in the middle of updating our tutorial and looks like this was not updated properly. We’re pushing out a docs release today to rectify this
j
That worked! To recap: 1. I moved
profiles.yml
from
jaffle_shop/config
to
jaffle_shop
2. I changed the argument in
dbt_assets = load_assets_from_dbt_project
fo be
profiles_dir=DBT_PROJECT_PATH
3. (probably not necessary) I removed
profiles_dir
from
DbtCliResource