fix(ingest/csv-enricher): Adding extra check in csv enricher to ignore non-urn urns (#8169)

Co-authored-by: Pedro Silva <pedro@acryl.io>
This commit is contained in:
Tamas Nemeth 2023-06-23 09:12:50 +02:00 committed by GitHub
parent 82272aed03
commit 726ee0f6b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -546,7 +546,9 @@ class CSVEnricherSource(Source):
term_urns: List[str] = terms_array_string.split(self.config.array_delimiter)
term_associations: List[GlossaryTermAssociationClass] = [
GlossaryTermAssociationClass(term) for term in term_urns
GlossaryTermAssociationClass(term)
for term in term_urns
if term.startswith("urn:li:")
]
return term_associations
@ -559,7 +561,7 @@ class CSVEnricherSource(Source):
tag_urns: List[str] = tags_array_string.split(self.config.array_delimiter)
tag_associations: List[TagAssociationClass] = [
TagAssociationClass(tag) for tag in tag_urns
TagAssociationClass(tag) for tag in tag_urns if tag.startswith("urn:li:")
]
return tag_associations
@ -582,7 +584,9 @@ class CSVEnricherSource(Source):
owner_urns: List[str] = owners_array_string.split(self.config.array_delimiter)
owners: List[OwnerClass] = [
OwnerClass(owner_urn, type=ownership_type) for owner_urn in owner_urns
OwnerClass(owner_urn, type=ownership_type)
for owner_urn in owner_urns
if owner_urn.startswith("urn:li:")
]
return owners