I'm assuming this is a super easy, but how to you ...
# integration-dbt
s
I'm assuming this is a super easy, but how to you find this path?
Copy code
dbt_assets = load_assets_from_dbt_project(project_dir="path/to/dbt/project")
r
This is the path in your file system that corresponds to your dbt project.
s
So something like this?
C:\Users\firstnamelastname\Documents\github_repo\dbt_project
r
Yeah, that’s right.
s
Hmmm. I'm following this documentation, and hung up on event the first part. Should my
profiles.yml
be under the config directory or the dbt project? I'm loading just the first section and dagster dev is throwing an error
Copy code
from dagster_dbt import load_assets_from_dbt_project

dbt_assets = load_assets_from_dbt_project(project_dir="path/to/dbt/project")
Here's the error:
Copy code
dagster_dbt.errors.DagsterDbtCliFatalRuntimeError: Fatal error in the dbt CLI (return code 2): Running with dbt=1.5.1 Encountered an error:
Runtime Error
  Could not find profile named 'dbt_project_name'
Can confirm that the
dbt_project.yml
name and the name in the
profiles.yml
match.
r
In
load_assets_from_dbt_project
, we expect your
profiles.yml
to be contained in a
config/
directory in your dbt project. If that’s not the case, you can explicitly pass in the path to your
profiles_dir
as well:
Copy code
from dagster_dbt import load_assets_from_dbt_project

dbt_assets = load_assets_from_dbt_project(
    project_dir="path/to/dbt/project",
    profiles_dir="path/to/dbt/profiles/dir"
)