Skip to content

Commit

Permalink
[docs] Fixed snippet mismatch
Browse files Browse the repository at this point in the history
The snippet shows now the code from lesson 7 (and lesson 9).
  • Loading branch information
onefloid authored Feb 1, 2024
1 parent f6a0162 commit 1760001
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ Now that you’ve partitioned the relevant assets, the schedule can be changed t
Currently, `trip_update_job` in `jobs/__init__.py` should look like this:

```python
trips_by_week = AssetSelection.keys("trips_by_week")

trip_update_job = define_asset_job(
name="trip_update_job",
selection=AssetSelection.all() - AssetSelection.keys(["trips_by_week"]),
name="trip_update_job",
selection=AssetSelection.all() - trips_by_week
)
```

Expand All @@ -39,9 +41,11 @@ The job should now look like this:
from dagster import define_asset_job, AssetSelection, AssetKey
from ..partitions import monthly_partition

trips_by_week = AssetSelection.keys("trips_by_week")

trip_update_job = define_asset_job(
name="trip_update_job",
partitions_def=monthly_partition, # partitions added here
selection=AssetSelection.all() - AssetSelection.keys(["trips_by_week"])
selection=AssetSelection.all() - trips_by_week
)
```

0 comments on commit 1760001

Please sign in to comment.