feat(ingestion): support custom properties to be ingested via business glossary yaml (#3438)

This commit is contained in:
Gabe Lyons 2021-10-21 22:21:23 -07:00 committed by GitHub
parent deedc120e2
commit 1fa49e2b79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -10,10 +10,16 @@ nodes:
terms:
- name: Sensitive
description: Sensitive Data
custom_properties:
is_confidential: false
- name: Confidential
description: Confidential Data
custom_properties:
is_confidential: true
- name: HighlyConfidential
description: Highly Confidential Data
description: Highly Confidential Data
custom_properties:
is_confidential: true
- name: PersonalInformation
description: All terms related to personal information
owners:

View File

@ -1,6 +1,6 @@
import logging
from dataclasses import dataclass, field
from typing import Any, Iterable, List, Optional, Union
from typing import Any, Dict, Iterable, List, Optional, Union
from pydantic import validator
@ -34,6 +34,7 @@ class GlossaryTermConfig(ConfigModel):
owners: Optional[Owners]
inherits: Optional[List[str]]
contains: Optional[List[str]]
custom_properties: Optional[Dict[str, str]]
class GlossaryNodeConfig(ConfigModel):
@ -209,6 +210,7 @@ def get_mces_from_term(
else defaults.source,
sourceUrl=glossaryTerm.source_url if glossaryTerm.source_url else defaults.url,
parentNode=parentNode,
customProperties=glossaryTerm.custom_properties,
)
aspects.append(term_info)