You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support partitions keyed by a categorical dimension (per-tenant, per-region, per-variant) beyond the static AllowedKeyMapper shipped in #61931. Production use needs runtime-resolved sets, lifecycle handling, and a different notion of completeness than temporal partitions.
fromairflow.sdkimportAsset, AllowedKeyMapper, PartitionAtRuntime, assetregion_raw_stats=Asset(
uri="file://incoming/player-stats/by-region.csv",
name="region_raw_stats",
)
# Must be a module-level function so the timetable is serialisable:# the scheduler stores its dotted path and re-imports at scheduling time.# Lambdas, closures, and bound methods are rejected at construction.deflist_active_regions() ->list[str]:
...
@asset(uri="file://analytics/player-stats/regional-breakdown.csv",schedule=PartitionAtRuntime(assets=region_raw_stats,default_partition_mapper=AllowedKeyMapper(list_active_regions), ),)defregional_stats_breakdown():
...
This could be how it works, but will affect #44146 implemented
dynamic segement based partition can be achieved by
# Producer emits per-segment partitions (observability) + one completion signal:@asset(schedule=PartitionAtRuntime())defregional_sales(self, outlet_events):
forregioninactive_regions(): # "what's active" = business logic, on the workerprocess(region)
outlet_events[self].add_partitions(region)
outlet_events[batch_done].add(...) # emit a completion event when the loop ends# Downstream triggers on the completion signal — plain asset scheduling:withDAG("global_report", schedule=batch_done):
...
and since we don't want to allow user code in scheduler, we won't add a new timetable or partition mapper for that
Activity
[-]Come up with plan for segment-based partitioning.[/-][+]Segment-based partitioning[/+]Lee-W commentedon Apr 24, 2026
This could be how it works, but will affect #44146 implemented
anishgirianish commentedon May 22, 2026
Hi, I am actively working on this. thanks
Lee-W commentedon Jun 11, 2026
dynamic segement based partition can be achieved by
and since we don't want to allow user code in scheduler, we won't add a new timetable or partition mapper for that