acryl-datahub 0.15.0rc17__py3-none-any.whl → 0.15.0rc18__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of acryl-datahub might be problematic. Click here for more details.
- {acryl_datahub-0.15.0rc17.dist-info → acryl_datahub-0.15.0rc18.dist-info}/METADATA +2435 -2435
- {acryl_datahub-0.15.0rc17.dist-info → acryl_datahub-0.15.0rc18.dist-info}/RECORD +7 -7
- datahub/__init__.py +1 -1
- datahub/ingestion/source/metadata/business_glossary.py +35 -18
- {acryl_datahub-0.15.0rc17.dist-info → acryl_datahub-0.15.0rc18.dist-info}/WHEEL +0 -0
- {acryl_datahub-0.15.0rc17.dist-info → acryl_datahub-0.15.0rc18.dist-info}/entry_points.txt +0 -0
- {acryl_datahub-0.15.0rc17.dist-info → acryl_datahub-0.15.0rc18.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
datahub/__init__.py,sha256=
|
|
1
|
+
datahub/__init__.py,sha256=IT3uFaiJFLl5DUkIwM1qTDLAORKdv0y2E2XTiSL4TyM,575
|
|
2
2
|
datahub/__main__.py,sha256=pegIvQ9hzK7IhqVeUi1MeADSZ2QlP-D3K0OQdEg55RU,106
|
|
3
3
|
datahub/entrypoints.py,sha256=3-qSfXAx3Z0FEkBV5tlO8fQr4xk4ySeDRMVTpS5Xd6A,7793
|
|
4
4
|
datahub/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -346,7 +346,7 @@ datahub/ingestion/source/looker/str_functions.py,sha256=zceEX2ka_4WaWwWgEdyknUSz
|
|
|
346
346
|
datahub/ingestion/source/looker/urn_functions.py,sha256=4VvqEfGvIMq3rNHHps0-HlPurMPnpqdxNtDAOOHIZww,528
|
|
347
347
|
datahub/ingestion/source/looker/view_upstream.py,sha256=rAWKif3UngeRGS_CMQqjihKs3Lxiu6DecLAdtdxvqOw,26096
|
|
348
348
|
datahub/ingestion/source/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
349
|
-
datahub/ingestion/source/metadata/business_glossary.py,sha256=
|
|
349
|
+
datahub/ingestion/source/metadata/business_glossary.py,sha256=yySwJp2SCUQp8hRwN2lQuSqvOQowIhCKDKj9syhlTZA,18210
|
|
350
350
|
datahub/ingestion/source/metadata/lineage.py,sha256=XiZGuY6k3O9qBmgo7AzosIndJHwrvEhapVLdRlDxCuc,9507
|
|
351
351
|
datahub/ingestion/source/neo4j/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
352
352
|
datahub/ingestion/source/neo4j/neo4j_source.py,sha256=L9WiZ5yZrIDMrgj3gYU9j6zz3TRMXYpcWxeTegD7sFg,12409
|
|
@@ -974,8 +974,8 @@ datahub_provider/operators/datahub_assertion_operator.py,sha256=uvTQ-jk2F0sbqqxp
|
|
|
974
974
|
datahub_provider/operators/datahub_assertion_sensor.py,sha256=lCBj_3x1cf5GMNpHdfkpHuyHfVxsm6ff5x2Z5iizcAo,140
|
|
975
975
|
datahub_provider/operators/datahub_operation_operator.py,sha256=aevDp2FzX7FxGlXrR0khoHNbxbhKR2qPEX5e8O2Jyzw,174
|
|
976
976
|
datahub_provider/operators/datahub_operation_sensor.py,sha256=8fcdVBCEPgqy1etTXgLoiHoJrRt_nzFZQMdSzHqSG7M,168
|
|
977
|
-
acryl_datahub-0.15.
|
|
978
|
-
acryl_datahub-0.15.
|
|
979
|
-
acryl_datahub-0.15.
|
|
980
|
-
acryl_datahub-0.15.
|
|
981
|
-
acryl_datahub-0.15.
|
|
977
|
+
acryl_datahub-0.15.0rc18.dist-info/METADATA,sha256=qrcInf1ZskftVhU7CPnCFSK96c0Klv1F-pLn70wszLI,173559
|
|
978
|
+
acryl_datahub-0.15.0rc18.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
979
|
+
acryl_datahub-0.15.0rc18.dist-info/entry_points.txt,sha256=Yj0PWB0LQOq4Rj2fyR6ETx4BUGw4TOcNL0ZNoAZ9kQg,9504
|
|
980
|
+
acryl_datahub-0.15.0rc18.dist-info/top_level.txt,sha256=iLjSrLK5ox1YVYcglRUkcvfZPvKlobBWx7CTUXx8_GI,25
|
|
981
|
+
acryl_datahub-0.15.0rc18.dist-info/RECORD,,
|
datahub/__init__.py
CHANGED
|
@@ -45,6 +45,9 @@ class Owners(ConfigModel):
|
|
|
45
45
|
groups: Optional[List[str]] = None
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
OwnersMultipleTypes = Union[List[Owners], Owners]
|
|
49
|
+
|
|
50
|
+
|
|
48
51
|
class KnowledgeCard(ConfigModel):
|
|
49
52
|
url: Optional[str] = None
|
|
50
53
|
label: Optional[str] = None
|
|
@@ -57,7 +60,7 @@ class GlossaryTermConfig(ConfigModel):
|
|
|
57
60
|
term_source: Optional[str] = None
|
|
58
61
|
source_ref: Optional[str] = None
|
|
59
62
|
source_url: Optional[str] = None
|
|
60
|
-
owners: Optional[
|
|
63
|
+
owners: Optional[OwnersMultipleTypes] = None
|
|
61
64
|
inherits: Optional[List[str]] = None
|
|
62
65
|
contains: Optional[List[str]] = None
|
|
63
66
|
values: Optional[List[str]] = None
|
|
@@ -74,7 +77,7 @@ class GlossaryNodeConfig(ConfigModel):
|
|
|
74
77
|
id: Optional[str] = None
|
|
75
78
|
name: str
|
|
76
79
|
description: str
|
|
77
|
-
owners: Optional[
|
|
80
|
+
owners: Optional[OwnersMultipleTypes] = None
|
|
78
81
|
terms: Optional[List["GlossaryTermConfig"]] = None
|
|
79
82
|
nodes: Optional[List["GlossaryNodeConfig"]] = None
|
|
80
83
|
knowledge_links: Optional[List[KnowledgeCard]] = None
|
|
@@ -88,7 +91,7 @@ class DefaultConfig(ConfigModel):
|
|
|
88
91
|
"""Holds defaults for populating fields in glossary terms"""
|
|
89
92
|
|
|
90
93
|
source: Optional[str] = None
|
|
91
|
-
owners:
|
|
94
|
+
owners: OwnersMultipleTypes
|
|
92
95
|
url: Optional[str] = None
|
|
93
96
|
source_type: str = "INTERNAL"
|
|
94
97
|
|
|
@@ -153,30 +156,44 @@ def make_glossary_term_urn(
|
|
|
153
156
|
return "urn:li:glossaryTerm:" + create_id(path, default_id, enable_auto_id)
|
|
154
157
|
|
|
155
158
|
|
|
156
|
-
def
|
|
157
|
-
|
|
159
|
+
def get_owners_multiple_types(owners: OwnersMultipleTypes) -> models.OwnershipClass:
|
|
160
|
+
"""Allows owner types to be a list and maintains backward compatibility"""
|
|
161
|
+
if isinstance(owners, Owners):
|
|
162
|
+
return models.OwnershipClass(owners=list(get_owners(owners)))
|
|
163
|
+
|
|
164
|
+
owners_meta: List[models.OwnerClass] = []
|
|
165
|
+
for owner in owners:
|
|
166
|
+
owners_meta.extend(get_owners(owner))
|
|
167
|
+
|
|
168
|
+
return models.OwnershipClass(owners=owners_meta)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def get_owners(owners: Owners) -> Iterable[models.OwnerClass]:
|
|
172
|
+
actual_type = owners.type or models.OwnershipTypeClass.DEVELOPER
|
|
173
|
+
|
|
174
|
+
if actual_type.startswith("urn:li:ownershipType:"):
|
|
175
|
+
ownership_type: str = "CUSTOM"
|
|
176
|
+
ownership_type_urn: Optional[str] = actual_type
|
|
177
|
+
else:
|
|
178
|
+
ownership_type, ownership_type_urn = validate_ownership_type(actual_type)
|
|
179
|
+
|
|
158
180
|
if owners.typeUrn is not None:
|
|
159
181
|
ownership_type_urn = owners.typeUrn
|
|
160
|
-
|
|
182
|
+
|
|
161
183
|
if owners.users is not None:
|
|
162
|
-
|
|
163
|
-
models.OwnerClass(
|
|
184
|
+
for o in owners.users:
|
|
185
|
+
yield models.OwnerClass(
|
|
164
186
|
owner=make_user_urn(o),
|
|
165
187
|
type=ownership_type,
|
|
166
188
|
typeUrn=ownership_type_urn,
|
|
167
189
|
)
|
|
168
|
-
for o in owners.users
|
|
169
|
-
]
|
|
170
190
|
if owners.groups is not None:
|
|
171
|
-
|
|
172
|
-
models.OwnerClass(
|
|
191
|
+
for o in owners.groups:
|
|
192
|
+
yield models.OwnerClass(
|
|
173
193
|
owner=make_group_urn(o),
|
|
174
194
|
type=ownership_type,
|
|
175
195
|
typeUrn=ownership_type_urn,
|
|
176
196
|
)
|
|
177
|
-
for o in owners.groups
|
|
178
|
-
]
|
|
179
|
-
return models.OwnershipClass(owners=owners_meta)
|
|
180
197
|
|
|
181
198
|
|
|
182
199
|
def get_mces(
|
|
@@ -185,7 +202,7 @@ def get_mces(
|
|
|
185
202
|
ingestion_config: BusinessGlossarySourceConfig,
|
|
186
203
|
ctx: PipelineContext,
|
|
187
204
|
) -> Iterable[Union[MetadataChangeProposalWrapper, models.MetadataChangeEventClass]]:
|
|
188
|
-
root_owners =
|
|
205
|
+
root_owners = get_owners_multiple_types(glossary.owners)
|
|
189
206
|
|
|
190
207
|
if glossary.nodes:
|
|
191
208
|
for node in glossary.nodes:
|
|
@@ -270,7 +287,7 @@ def get_mces_from_node(
|
|
|
270
287
|
node_owners = parentOwners
|
|
271
288
|
if glossaryNode.owners is not None:
|
|
272
289
|
assert glossaryNode.owners is not None
|
|
273
|
-
node_owners =
|
|
290
|
+
node_owners = get_owners_multiple_types(glossaryNode.owners)
|
|
274
291
|
|
|
275
292
|
node_snapshot = models.GlossaryNodeSnapshotClass(
|
|
276
293
|
urn=node_urn,
|
|
@@ -426,7 +443,7 @@ def get_mces_from_term(
|
|
|
426
443
|
ownership: models.OwnershipClass = parentOwnership
|
|
427
444
|
if glossaryTerm.owners is not None:
|
|
428
445
|
assert glossaryTerm.owners is not None
|
|
429
|
-
ownership =
|
|
446
|
+
ownership = get_owners_multiple_types(glossaryTerm.owners)
|
|
430
447
|
aspects.append(ownership)
|
|
431
448
|
|
|
432
449
|
if glossaryTerm.domain is not None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|