https://dagster.io/ logo
#announcements
Title
# announcements
j

Jason

02/05/2021, 3:16 PM
Morning... Regarding
schedules
and
presets
- If i have a pipeline with one or multiple presents (say "dev" and "prod" related) and i'm using the UI, I can easily pick which preset I need. And I understand the function decorated by
@schedule
must return a
run config
but how do I get it to return a preset? (how to I get the pipeline to run a specific preset on a schedule)
r

Ryan

02/05/2021, 3:20 PM
Hey Jason, I might be misunderstanding the question but would it be the
mode
parameter to the schedule decorators?
j

Jason

02/05/2021, 3:28 PM
AH! So on along with the preset, I need to create a
mode
and then set mode on the schedule. Awesome. Thank you
d

daniel

02/05/2021, 3:31 PM
@Jason in addition to that you also need to return the preset's run config from the schedule function as shown here: https://github.com/dagster-io/dagster/discussions/2943 (You can get the PresetDefinition by calling .get_preset(preset_name) on the pipeline)
j

Jason

02/05/2021, 3:39 PM
Interesting - didn't think of looking at
discussions
on github. Thanks
dagsir 1