Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ingest): use corpGroup instead of corpgroup #6202

Merged
merged 1 commit into from
Oct 15, 2022
Merged
Show file tree
Hide file tree
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
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