Skip to content

Commit

Permalink
fix(ingest): support patches in auto_status_aspect (datahub-project…
Browse files Browse the repository at this point in the history
…#6827)

Patches generate a raw MCP because MCPW doesn't support patches right now, so we need to handle that correctly downstream.
  • Loading branch information
hsheth2 authored and cccs-Dustin committed Feb 1, 2023
1 parent d738640 commit d2d67da
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion metadata-ingestion/src/datahub/utilities/source_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
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


Expand Down Expand Up @@ -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)}")

Expand Down

0 comments on commit d2d67da

Please sign in to comment.