Aleksi Knuutila
05/01/2023, 9:58 AMclaire
05/01/2023, 6:08 PMpartitions_to_fetch = partitions_def.get_partition_keys(...)
partition_materializations = context.instance.get_event_records(
EventRecordsFilter(
event_type=DagsterEventType.ASSET_MATERIALIZATION,
asset_key=asset_key,
asset_partitions=partitions_to_fetch,
),
)
materialized_keys = set(materialization.partition_key for materialization in partition_materializations)
unmaterialized_keys = set(partitions_to_fetch) - set(materialized_keys)