mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-19 06:38:04 +00:00
fix(cli): fix unknown aspect bug in dataset upsert cli (#12946)
This commit is contained in:
parent
1d6c15edd3
commit
dd4aff2208
@ -506,7 +506,7 @@ class Dataset(StrictModel):
|
||||
# We don't check references for tags
|
||||
return list(set(references))
|
||||
|
||||
def generate_mcp( # noqa: C901
|
||||
def generate_mcp(
|
||||
self,
|
||||
) -> Iterable[Union[MetadataChangeProposalClass, MetadataChangeProposalWrapper]]:
|
||||
mcp = MetadataChangeProposalWrapper(
|
||||
@ -643,33 +643,6 @@ class Dataset(StrictModel):
|
||||
)
|
||||
assert field_urn.startswith("urn:li:schemaField:")
|
||||
|
||||
if field.globalTags:
|
||||
mcp = MetadataChangeProposalWrapper(
|
||||
entityUrn=field_urn,
|
||||
aspect=GlobalTagsClass(
|
||||
tags=[
|
||||
TagAssociationClass(tag=make_tag_urn(tag))
|
||||
for tag in field.globalTags
|
||||
]
|
||||
),
|
||||
)
|
||||
yield mcp
|
||||
|
||||
if field.glossaryTerms:
|
||||
mcp = MetadataChangeProposalWrapper(
|
||||
entityUrn=field_urn,
|
||||
aspect=GlossaryTermsClass(
|
||||
terms=[
|
||||
GlossaryTermAssociationClass(
|
||||
urn=make_term_urn(term)
|
||||
)
|
||||
for term in field.glossaryTerms
|
||||
],
|
||||
auditStamp=self._mint_auditstamp("yaml"),
|
||||
),
|
||||
)
|
||||
yield mcp
|
||||
|
||||
if field.structured_properties:
|
||||
urn_prefix = f"{StructuredPropertyUrn.URN_PREFIX}:{StructuredPropertyUrn.LI_DOMAIN}:{StructuredPropertyUrn.ENTITY_TYPE}"
|
||||
mcp = MetadataChangeProposalWrapper(
|
||||
|
Loading…
x
Reference in New Issue
Block a user