Roei Jacobovich
04/20/2023, 7:52 PMMultiPartitionsDefinition
combined of an hourly one and a dynamic one. I know it’s possible to run backfill as one single job for many partitions, as demonstrated during the last community meeting D
Is it possible to combine many partitions as well for schedules (and the underlying jobs)?claire
04/20/2023, 9:52 PMclaire
04/20/2023, 9:58 PMpartitions_def.get_partition_keys
, and for multipartitioned assets this gets a little complicated. I.e.:
MultiPartitionsDefinition(
{
"date": DailyPartitionsDefinition(start_date="2022-06-11"),
"abc": StaticPartitionsDefinition(["a", "b", "c"]),
}
)
has partition keys ['a|2022-06-11'...'a|2023-01-16', 'b|2022-06-11'...'b|2023-01-16', 'c|2022-06-11'...'c|2023-01-16']
so selecting a range a|2022-06-11...b|2022-06-11
will select all of the "a" partition dimension keys.
So basically out of the partition keys you want to backfill, you'll have to determine which contiguous ranges exist and kick off a run request per range.Roei Jacobovich
04/21/2023, 8:29 AMdate
partition is fixed and the abc
partition in your example is the “range”?
i.e ['a|2022-06-11','b|2023-01-11','c|2022-06-11']
claire
04/21/2023, 4:51 PMget_partition_keys
, so ['a|2022-06-11'...,'c|2022-06-11']
includes all the keys in between in the get_partition_keys
list.
I know that this is awkward, ideally we should be able to select ranges across any arbitrary dimension.Drew You
06/21/2023, 1:44 PMstart = context.asset_partition_key_range_for_output().start
for a multipartitioned asset with an hourly partition