https://dagster.io/ logo
a

aqm

07/24/2020, 3:04 AM
In dagit playgroud we can select a present before executing a run. I'd like to use a preset for a scheduled run as well. Is this possible? The scheduler takes a mode but not a preset (https://docs.dagster.io/_apidocs/schedules)
s

sashank

07/24/2020, 3:42 AM
Hey @aqm, you can just construct a schedule from a preset definition, like so:
Copy code
def daily_schedule(
   start_date=...,
    pipeline_name="my_pipeline",
    solid_selection=preset.solid_selection,
    mode=preset.mode,
    run_config=preset.run_config,
    tags_fn_for_date=lambda: _: preset.tags,
):
def my_daily_schedule(_date):
    return preset.run_config
`
a

aqm

07/24/2020, 3:50 AM
thanks we'll try that
z

Zach

08/02/2020, 4:12 PM
@sashank Sorry to resurrect an old thread here, but how would you do that if you also wanted to pass the date partition to a solid config + the preset config?
Also, just to add, there doesn't appear to be a run_config argument in the schedule decorators?