Vinnie
05/03/2023, 8:55 AM0.19.2
I started getting an error saying dbt can’t find a dbt_project.yml
inside the --project-dir
, is this a known issue that will be fixed in the next release? I didn’t change anything else besides the upgrade. Tested on dbt-core 1.4.2
and 1.4.6
, running ls $PROJECT_DIR
inside the docker image shows the dbt_project file correctly and the dbt command seems to be parsed correctly by dagster, so I’m at a loss here. Parsed command: dbt --no-use-colors --log-format json ls --project-dir dp_dbthub --profiles-dir dp_dbthub/profiles --select * --output json
owen
05/03/2023, 4:22 PMdbt-core
has historically been fairly inconsistent on how it handles relative paths passed into the command, and most recently this regression in dbt-core
1.5.0 prompted us to make a change such that commands would be executed in the project directory.
in cases where the project-dir is a relative path, rather than an absolute path, this would cause the issue you're seeing. so the immediate fix would be to configure your dbt resource with an absolute path, but this is definitely a bug that we should fix. just created a ticket here, which should be solvable for next week's releaseVinnie
05/03/2023, 5:44 PMVinnie
05/04/2023, 12:14 PMIan Venter
05/05/2023, 3:59 AMfrom pathlib import Path
#DBT_PROJECT_PATH = file_relative_path(__file__, "../../dbt_project")
DBT_PROJECT_PATH = str(Path(__file__).absolute().parent.parent / 'dbt_project')
owen
05/05/2023, 8:08 PMfile_relative_path
is actually creating an absolute path out of the file-relative path)
are you hitting the same error in both of those forms? if so, can you confirm the dagster-dbt version you're using, and what the last versions of dbt-core/dagster-dbt that worked for you were?Ian Venter
05/05/2023, 9:52 PMowen
05/05/2023, 10:02 PMconfig:
block, which doesn't make a ton of sense)