Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from datahub.emitter.rest_emitter import DatahubRestEmitter
from datahub.metadata.schema_classes import (
ChangeTypeClass,
MetadataChangeLogClass,
MetadataChangeProposalClass,
)
Expand Down Expand Up @@ -128,9 +129,11 @@ def buildMcp(
self, orig_event: MetadataChangeLogClass
) -> Union[MetadataChangeProposalClass, None]:
try:
if orig_event.changeType == ChangeTypeClass.RESTATE or orig_event.changeType == "RESTATE":
changeType = ChangeTypeClass.UPSERT
mcp = MetadataChangeProposalClass(
entityType=orig_event.get("entityType"),
changeType=orig_event.get("changeType"),
changeType=change_type,
entityUrn=orig_event.get("entityUrn"),
entityKeyAspect=orig_event.get("entityKeyAspect"),
aspectName=orig_event.get("aspectName"),
Expand Down