Adam Ward
07/11/2023, 8:59 PMrun_config = custom_run_config
in the schedule decorator parameters:
dagster._check.ParameterCheckError: Param "run_config" is not one of ['Mapping']. Got <dagster._core.definitions.run_config.RunConfig object at 0x0000026900DF3F70> which is type <class 'dagster._core.definitions.run_config.RunConfig'>.
Adam Ward
07/11/2023, 9:40 PMMapping
type, however, the RunRequest.__new__
method is typed to accept a RunConfig too.chris
07/11/2023, 10:10 PMchris
07/11/2023, 10:25 PMAdam Ward
07/11/2023, 11:55 PM@schedule
decorated function. Example below:
@schedule(
job=my_scheduled_job,
cron_schedule="0 * * * *",
execution_timezone="America/Los_Angeles",
)
def run_job_every_hour(context: ScheduleEvaluationContext):
one_hour_ago_from_schedule: datetime = (
context.scheduled_execution_time - timedelta(hours=1)
)
return RunRequest(
run_key=None,
run_config=RunConfig(
ops={
"run_job_query": OpConfigForJobQuery(
start_year=f'{one_hour_ago_from_schedule.year:04d}',
start_month=f'{one_hour_ago_from_schedule.month:02d}',
start_day=f'{one_hour_ago_from_schedule.day:02d}',
start_hour=f'{one_hour_ago_from_schedule.hour:02d}',
start_min=f'{one_hour_ago_from_schedule.minute:02d}',
timezone="Pacific"
)
}
)
)
I am running Dagster 1.3.12.Adam Ward
07/12/2023, 9:33 PM.to_config_dict
resolved the issue for now, but I'd like to try to figure out why this isn't working without doing that, if possible.chris
07/13/2023, 4:19 PM