Auster Cid
11/05/2021, 6:49 PMRun Config Functions
and Date Partition Sets
for each of these pipelines.
Launching partition runs from the playground works as expected, but when running a backfill, all launched runs get the config of the last partition selected for the backfill. Any idea why?daniel
11/05/2021, 6:53 PMAuster Cid
11/05/2021, 7:07 PMdef return_partition_set_pipe_factory(name):
return PartitionSetDefinition(
name=f"{name}_dates",
pipeline_name=name,
partition_fn=date_partition_range(
start=datetime.datetime(2020, 1, 1), inclusive=True
),
run_config_fn_for_partition=run_config_pipe_factory(name),
)
def partitions_set_pipe_factory():
return [return_partition_set_pipe_factory(name) for name in yaml_data]
daniel
11/05/2021, 7:09 PMAuster Cid
11/05/2021, 7:10 PMdef run_config_pipe_factory(name):
def run_config(partition):
# read yaml data and populate run config dict
return dict
return run_config
daniel
11/05/2021, 7:16 PMAuster Cid
11/05/2021, 7:17 PMdaniel
11/05/2021, 7:17 PMSHARED_RUN_CONFIG = {} // Template
def my_run_config() {
my_config = SHARED_RUN_CONFIG
my_config["partition_specific_stuff"] = "your_stuff
return my_config
}
I could see this happening in that caseAuster Cid
11/05/2021, 7:21 PMdaniel
11/05/2021, 7:54 PM