Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
fix(ingest): use corpGroup instead of corpgroup (datahub-project#6202)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored and cccs-tom committed Nov 18, 2022
1 parent f2448a7 commit be90dce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion docs/what/relationship.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Note that the name of the relationship reflects the direction, i.e. pointing fro
This is due to the fact that the actual metadata aspect holding this information is associated with `Group`, rather than User.
Had the direction been reversed, the relationship would have been named `IsMemberOf` instead.
See [Direction of Relationships](#direction-of-relationships) for more discussions on relationship directionality.
A specific instance of a relationship, e.g. `urn:li:corpgroup:group1` has a member `urn:li:corpuser:user1`,
A specific instance of a relationship, e.g. `urn:li:corpGroup:group1` has a member `urn:li:corpuser:user1`,
corresponds to an edge in the metadata graph.

Similar to an entity, a relationship can also be associated with optional attributes that are derived from the metadata.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from datahub.emitter.mcp import MetadataChangeProposalWrapper
from datahub.emitter.rest_emitter import DatahubRestEmitter
from datahub.metadata.schema_classes import (
ChangeTypeClass,
CorpGroupEditableInfoClass,
CorpGroupInfoClass,
)
Expand Down Expand Up @@ -47,23 +46,18 @@ def __post_init__(self):
def generate_mcp(self) -> Iterable[MetadataChangeProposalWrapper]:
if self.overrideEditable:
mcp = MetadataChangeProposalWrapper(
entityType="corpgroup",
entityUrn=str(self.urn),
aspectName="corpGroupEditableInfo",
aspect=CorpGroupEditableInfoClass(
description=self.description,
pictureLink=self.picture_link,
slack=self.slack,
email=self.email,
),
changeType=ChangeTypeClass.UPSERT,
)
yield mcp

mcp = MetadataChangeProposalWrapper(
entityType="corpgroup",
entityUrn=str(self.urn),
aspectName="corpGroupInfo",
aspect=CorpGroupInfoClass(
admins=[], # Deprecated, replaced by Ownership aspect
members=[], # Deprecated, replaced by GroupMembership aspect
Expand All @@ -72,7 +66,6 @@ def generate_mcp(self) -> Iterable[MetadataChangeProposalWrapper]:
email=self.email,
description=self.description,
),
changeType=ChangeTypeClass.UPSERT,
)
yield mcp

Expand Down

0 comments on commit be90dce

Please sign in to comment.