https://dagster.io/ logo
t

Tobias Macey

09/23/2020, 2:48 PM
In defining a schedule, is there a way to specify which preset to use for a given pipeline?
s

sashank

09/23/2020, 2:56 PM
Copy code
def daily_schedule(
    start_date=...,
    pipeline_name="my_pipeline",
    solid_selection=preset.solid_selection,
    mode=preset.mode,
    tags_fn_for_date=lambda: _: preset.tags,
):
def my_daily_schedule(_date):
    return preset.run_config
You can construct a schedule definition using a preset like so
Btw, questions like these are great for our new discussions page: https://github.com/dagster-io/dagster/discussions
t

Tobias Macey

09/23/2020, 2:58 PM
Roger that, I'll post this there as well so it's more durable.
🎉 1
s

sashank

09/23/2020, 3:23 PM
Thanks!
t

Tobias Macey

09/23/2020, 3:48 PM
I added some clarifying questions as followup if you have a minute to take a look. Thanks for the quick turnaround!
s

sashank

09/23/2020, 5:22 PM
Replied!
t

Tobias Macey

09/23/2020, 6:26 PM
I've got another question related to populating the schedule, do you want me to just add it to that same question, or start a new one? Trying to figure out how to structure my workspace.yaml and issue the appropriate
dagster schedule up
command.
s

sashank

09/23/2020, 6:26 PM
Up to you!
Sounds like making a new one would be the best
t

Tobias Macey

09/23/2020, 6:32 PM
Figured it out. My issue was that I forgot to set DAGSTER_HOME
👍 1
s

sashank

09/23/2020, 6:32 PM
Just curious - what was the error?
t

Tobias Macey

09/23/2020, 6:33 PM
Copy code
dagster schedule up --preview -w /etc/dagster/workspace.yaml --location residential_edx_repository
Usage: dagster schedule up [OPTIONS]

Error: A scheduler must be configured to run schedule commands.
You can configure a scheduler on your instance using dagster.yaml.
For more information, see:

<https://docs.dagster.io/deploying/instance/#scheduler>
s

sashank

09/23/2020, 6:33 PM
Sounds like we could do a better job telling you that the missing DAGSTER_HOME env var was the issue
Got it, thanks
Yeah we should first let you know that DAGSTER_HOME is missing
t

Tobias Macey

09/23/2020, 6:33 PM
I'll finish asking the question and then answer it for posterity since it's already half typed.
s

sashank

09/23/2020, 6:34 PM
cc @rex do you want to take a look at this?
s

sashank

09/23/2020, 10:16 PM
Thanks!