From 4606b2e34e953a9b2755dd36eed7194baf7f9424 Mon Sep 17 00:00:00 2001 From: Maxime Armstrong Date: Tue, 23 Jul 2024 12:00:27 -0400 Subject: [PATCH] Update project.py --- jaffle_dagster/jaffle_dagster/project.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/jaffle_dagster/jaffle_dagster/project.py b/jaffle_dagster/jaffle_dagster/project.py index 808b6f0..cff8e25 100644 --- a/jaffle_dagster/jaffle_dagster/project.py +++ b/jaffle_dagster/jaffle_dagster/project.py @@ -1,9 +1,15 @@ from pathlib import Path from dagster_dbt import DbtProject +from dagster_dbt.dbt_project import using_dagster_dev + +if using_dagster_dev(): + project_dir = Path(__file__).joinpath("..", "..", "..", "jaffle_shop").resolve() +else: + project_dir = Path(__file__).joinpath("..", "..", "jaffle_shop").resolve() jaffle_shop_project = DbtProject( - project_dir=Path(__file__).joinpath("..", "..", "..", "jaffle_shop").resolve(), + project_dir=project_dir, packaged_project_dir=Path(__file__).joinpath("..", "..", "dbt-project").resolve(), ) -jaffle_shop_project.prepare_if_dev() \ No newline at end of file +jaffle_shop_project.prepare_if_dev()