Skip to content

Commit

Permalink
[daggy-u] - Add prepare_if_dev() explanation to Lesson 4 (#23474)
Browse files Browse the repository at this point in the history
  • Loading branch information
erinkcochran87 authored Aug 7, 2024
1 parent 87b0fd9 commit 9a9f482
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ dbt_project.prepare_if_dev()

If you look at the dbt project’s `/target` directory, you’ll see it stores the artifacts. When you use `dagster dev` in local development and you reload your code, you'll see that a new manifest file is generated.

Reload your code location in the Dagster UI, and you’ll see that everything should still work: the dbt models are still shown as assets and you can manually materialize any of the models. The key difference is that you no longer have to manually run `dbt parse` anymore!
The `prepare_if_dev()` method automatically prepares your dbt project at run time during development, meaning you no longer have to run `dbt parse`! The preparation process works by pulling the dbt project's dependencies and reloading the manifest file to detect any changes.

Reload your code location in the Dagster UI, and you’ll see that everything should still work: the dbt models are still shown as assets and you can manually materialize any of the models.

---

Expand Down

2 comments on commit 9a9f482

@github-actions
Copy link

Choose a reason for hiding this comment

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

Deploy preview for dagster-docs ready!

✅ Preview
https://dagster-docs-bbtde2z21-elementl.vercel.app
https://master.dagster.dagster-docs.io

Built with commit 9a9f482.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link

Choose a reason for hiding this comment

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

Deploy preview for dagster-university ready!

✅ Preview
https://dagster-university-d6vhxr06h-elementl.vercel.app

Built with commit 9a9f482.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.