Stephen
Stephen

Reputation: 8858

RunConfig created by schedule - what happens during reruns?

Say I use the @schedule decorator to create a RunRequest with RunConfig and partition as follows:

class MyAssetConfig(Config): x: str y: str

@schedule(...)
def some_scheduler(context: ScheduleEvaluationContext):
    
    my_asset_config = MyAssetConfig(x="xxxx", y="yyyy")

    run_config = RunConfig(ops={"asset1": my_asset_config)
    yield RunRequest(run_key="abc", partition_key="abc", run_config=run_config)

Now say this is scheduled and later I want to rerun a partition for some reason. The corresponding asset code would have the partition_key. But what happens to the run_config? Do I have to manually provide values for x and y again when I attempt to rerun the partition? Are the values used from the original run for x and y lost or could I easily say please use the same run_config as before?

The thing I'm really wondering about is, how much can I place in the config that is sort of partition-like information, versus how much of that type of information do I need to place in the partition itself to preserve the ability to rerun?

Upvotes: 0

Views: 15

Answers (0)

Related Questions