mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-31 12:52:13 +00:00
fix(ingest): support patches in auto_status_aspect
(#6827)
Patches generate a raw MCP because MCPW doesn't support patches right now, so we need to handle that correctly downstream.
This commit is contained in:
parent
a1970d2dce
commit
8972ea4b04
@ -5,7 +5,11 @@ from datahub.ingestion.api.workunit import MetadataWorkUnit
|
||||
from datahub.ingestion.source.state.stale_entity_removal_handler import (
|
||||
StaleEntityRemovalHandler,
|
||||
)
|
||||
from datahub.metadata.schema_classes import MetadataChangeEventClass, StatusClass
|
||||
from datahub.metadata.schema_classes import (
|
||||
MetadataChangeEventClass,
|
||||
MetadataChangeProposalClass,
|
||||
StatusClass,
|
||||
)
|
||||
from datahub.utilities.urns.urn import guess_entity_type
|
||||
|
||||
|
||||
@ -40,6 +44,9 @@ def auto_status_aspect(
|
||||
elif isinstance(wu.metadata, MetadataChangeProposalWrapper):
|
||||
if isinstance(wu.metadata.aspect, StatusClass):
|
||||
status_urns.add(urn)
|
||||
elif isinstance(wu.metadata, MetadataChangeProposalClass):
|
||||
if wu.metadata.aspectName == StatusClass.ASPECT_NAME:
|
||||
status_urns.add(urn)
|
||||
else:
|
||||
raise ValueError(f"Unexpected type {type(wu.metadata)}")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user