Morning... Regarding `schedules` and `presets` - I...
# announcements
j
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
Hey Jason, I might be misunderstanding the question but would it be the
mode
parameter to the schedule decorators?
j
AH! So on along with the preset, I need to create a
mode
and then set mode on the schedule. Awesome. Thank you
d
@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
Interesting - didn't think of looking at
discussions
on github. Thanks
dagsir 1