From 1760001fa12e72f12c4fb86a091d63d1398fc068 Mon Sep 17 00:00:00 2001 From: onefloid <33193059+onefloid@users.noreply.github.com> Date: Thu, 1 Feb 2024 17:16:32 +0100 Subject: [PATCH] [docs] Fixed snippet mismatch The snippet shows now the code from lesson 7 (and lesson 9). --- .../creating-a-schedule-with-a-date-based-partition.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/dagster-university/pages/dagster-essentials/lesson-8/creating-a-schedule-with-a-date-based-partition.md b/docs/dagster-university/pages/dagster-essentials/lesson-8/creating-a-schedule-with-a-date-based-partition.md index 87c63ff6ee877..5c054b41d7b61 100644 --- a/docs/dagster-university/pages/dagster-essentials/lesson-8/creating-a-schedule-with-a-date-based-partition.md +++ b/docs/dagster-university/pages/dagster-essentials/lesson-8/creating-a-schedule-with-a-date-based-partition.md @@ -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 ) ``` @@ -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 ) ```