Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify prepare_if_dev explanation in dbt tutorial #23765

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

sryza
Copy link
Contributor

@sryza sryza commented Aug 20, 2024

Summary & Motivation

The dbt tutorial explains prepare_if_dev in a couple different ways, and I think it could get the same info across with a bit less.

How I Tested These Changes

@graphite-app graphite-app bot added the area: docs Related to documentation in general label Aug 20, 2024
@graphite-app graphite-app bot requested a review from erinkcochran87 August 20, 2024 19:22
@sryza
Copy link
Contributor Author

sryza commented Sep 9, 2024

@maximearmstrong @erinkcochran87 - mind taking a look at this one?


In this tutorial, we're going with the first option: We run `dagster dev` and use `dbt_project.prepare_if_dev()` to prepare the dbt project and create the manifest.
However, in development, when you're iteratively making changes to files inside your dbt project and seeing what effects they have, you typically want those changes to be reflected in your local Dagster UI ASAP, without requiring you to explicitly re-generate the manifest. `dbt_project.prepare_if_dev()` helps with this – it re-generates your `manifest.json` at the time Dagster imports your code, _but_ only if it's being imported by the `dagster dev` command.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
However, in development, when you're iteratively making changes to files inside your dbt project and seeing what effects they have, you typically want those changes to be reflected in your local Dagster UI ASAP, without requiring you to explicitly re-generate the manifest. `dbt_project.prepare_if_dev()` helps with this – it re-generates your `manifest.json` at the time Dagster imports your code, _but_ only if it's being imported by the `dagster dev` command.
However, in development, you typically want changes made to files in your dbt project to be immediately reflected in the Dagster UI without needing to regenerate the manifest.
`dbt_project.prepare_if_dev()` helps with this – it re-generates your `manifest.json` at the time Dagster imports your code, but only if it's being imported by the `dagster dev` command.

I think we can tighten this up more

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 good point, made this change

@sryza sryza force-pushed the dbt-tutorial-manifest branch from 0707b4b to b03ce04 Compare September 9, 2024 19:55
@sryza sryza requested a review from erinkcochran87 September 9, 2024 19:55
@sryza sryza merged commit d361dbb into master Sep 12, 2024
1 of 2 checks passed
@sryza sryza deleted the dbt-tutorial-manifest branch September 12, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs Related to documentation in general
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants