Daniel Gafni
07/09/2022, 7:41 AMpartition_mappings
for an asset, is there any way to get the exact set of the mapped partitions of the upstream asset?
I understand how to access the partitions range with range_start, range_end = context.asset_partition_key_range
, but I would like to have the exact set, because it may differ for different partitioning schemas (daily, monthly, etc). Seems like dagster.core.definitions.time_window_partitions.TimeWindowPartitionsDefinition.get_partitions
would help, but I don't know how to access it from the IO Manager context.
Any help?sandy
07/11/2022, 3:21 AMcontext.asset_output_info.partitions_def
on an OutputContext
. I'd recommend using get_partition_keys
instead of get_partitions
, because the latter returns Partition
objects instead of strings, which might not be supported in the futureDaniel Gafni
07/11/2022, 6:05 AMcontext.upstream_output.asset_info.partitions_def
I assume this is the one I need? There is no asset_output_info
attribute.Daniel Gafni
07/11/2022, 6:07 AMDaniel Gafni
07/12/2022, 11:07 AM