https://dagster.io/ logo
#integration-dbt
Title
# integration-dbt
f

Félix Tremblay

12/05/2022, 2:49 AM
Hello 👋, dagster-dbt does not work correctly when we change the target-path (which is useful when dbt is not allowed to write in the project dir). I'm on the latest version 0.17.5 The value of
target-path
in the
dbt_project.yml
is not used • a workaround is to set the config target_path for
dbt_cli_resource
, but I think many dbt users will want to use
dbt_project.yml
If I change the value of
target-path
in the
dbt_project.yml
, (and not in the configs for
dbt_cli_resource
), I get the following error:
Copy code
dagster_dbt.errors.DagsterDbtCliOutputsNotFoundError: Expected to find file at path /opt/dagster/dagster_home/dbt_test_project/target/run_results.json
  File "/opt/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/execute_plan.py", line 266, in dagster_event_sequence_for_step
    for step_event in check.generator(step_events):
  File "/opt/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/execute_step.py", line 388, in core_dagster_event_sequence_for_step
    for user_event in check.generator(
  File "/opt/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/execute_step.py", line 94, in _step_output_error_checked_user_event_sequence
    for user_event in user_event_sequence:
  File "/opt/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/compute.py", line 177, in execute_core_compute
    for step_output in _yield_compute_results(step_context, inputs, compute_fn):
  File "/opt/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/compute.py", line 145, in _yield_compute_results
    for event in iterate_with_context(
  File "/opt/venv/lib/python3.8/site-packages/dagster/_utils/__init__.py", line 460, in iterate_with_context
    next_output = next(iterator)
  File "/opt/venv/lib/python3.8/site-packages/dagster_dbt/ops.py", line 96, in dbt_run_op
    dbt_output = context.resources.dbt.run()
  File "/opt/venv/lib/python3.8/site-packages/dagster_dbt/cli/resources.py", line 145, in run
    return self.cli("run", models=models, exclude=exclude, select=select, **kwargs)
  File "/opt/venv/lib/python3.8/site-packages/dagster_dbt/cli/resources.py", line 90, in cli
    return execute_cli(
  File "/opt/venv/lib/python3.8/site-packages/dagster_dbt/cli/utils.py", line 145, in execute_cli
    parse_run_results(flags_dict["project-dir"], target_path)
  File "/opt/venv/lib/python3.8/site-packages/dagster_dbt/cli/utils.py", line 167, in parse_run_results
    raise DagsterDbtCliOutputsNotFoundError(path=run_results_path)
r

rex

12/05/2022, 3:10 AM
Could you file an GitHub issue? We can take a look tomorrow cc @owen
f

Félix Tremblay

12/06/2022, 1:59 PM
@rex @owen, I filed an issue #10918
4 Views