Skip to content

Commit

Permalink
[du] fixing imports for 4-automating-dbt-models-in-dagster (#21765)
Browse files Browse the repository at this point in the history
## Summary & Motivation

## How I Tested These Changes
  • Loading branch information
tacastillo authored Oct 1, 2024
1 parent 3050a17 commit 4b71e37
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ This is where you’d lean on a function like [`build_dbt_asset_selection`](http

The function will return an `AssetSelection` of the dbt models that match your dbt selector. Let’s put this into practice:

1. At the top of `jobs/__init__.py`, import `dbt_analytics` from the `assets.dbt` module:
1. At the top of `jobs/__init__.py`, import `dbt_analytics` from the `assets.dbt` module, along with the `build_dbt_asset_selection` function from `dagster_dbt`:

```python
from ..assets.dbt import dbt_analytics
from dagster_dbt import build_dbt_asset_selection
```

2. After the other selections, define a new variable called `dbt_trips_selection` and make a call to `build_dbt_asset_selection`. Pass in the `dbt_analytics` definition and a string that selects `stg_trips` and all dbt models downstream of it:
Expand Down

2 comments on commit 4b71e37

@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-dgmeknm60-elementl.vercel.app

Built with commit 4b71e37.
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-docs ready!

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

Built with commit 4b71e37.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.