Jason Gofford
02/09/2024, 4:02 PMDbtCliResource
to compile a dbt project the artefacts including the manifest end up in a subfolder, e.g., 8ec9053/manifest.json
. Is the subfoldering a Dagster thing, or a new dbt thing?rex
02/09/2024, 4:05 PMJason Gofford
02/09/2024, 4:06 PMrex
02/09/2024, 4:06 PM• target_path (Optional[Path]) – An explicit path to a target folder to use to store and retrieve dbt artifacts when running a dbt CLI command. If not provided, a unique target path will be generated.
Jason Gofford
02/09/2024, 4:08 PMrex
02/09/2024, 4:08 PMrex
02/09/2024, 4:09 PMJason Gofford
02/09/2024, 4:13 PMrex
02/09/2024, 4:16 PMdagster-dbt project scaffold
. This was after some feedback from the community: https://github.com/dagster-io/dagster/pull/18501/files
The relevant tidbit:
if os.getenv("DAGSTER_DBT_PARSE_PROJECT_ON_LOAD"):
dbt_manifest_path = (
dbt.cli(
["--quiet", "parse"],
target_path=Path("target"),
)
.wait()
.target_path.joinpath("manifest.json")
)
Jason Gofford
02/09/2024, 4:26 PMdbt clone
into a dev database from a production manifest that's backed up on GCS. The CLI currently sits in the same project as the dagster assets and the @dbt_asset()
decorator was forcing a compile on every command because the target path was changing.