-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(glossary): support multiple ownership types (#12050)
Co-authored-by: Aseem Bansal <[email protected]>
- Loading branch information
1 parent
2ec9cb0
commit 507087a
Showing
10 changed files
with
1,062 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
metadata-ingestion/tests/integration/business-glossary/custom_ownership_urns.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
version: "1" | ||
source: DataHub | ||
owners: | ||
users: | ||
- mjames | ||
url: "https://github.com/datahub-project/datahub/" | ||
|
||
nodes: | ||
- name: Custom URN Types | ||
description: Testing custom ownership URN types | ||
owners: | ||
- type: urn:li:ownershipType:custom_type_1 | ||
users: | ||
- user1 | ||
groups: | ||
- group1 | ||
- type: urn:li:ownershipType:custom_type_2 | ||
users: | ||
- user2 | ||
terms: | ||
- name: Mixed URN Types | ||
description: Term with custom URN types | ||
owners: | ||
- type: urn:li:ownershipType:custom_type_3 | ||
users: | ||
- user3 | ||
- type: urn:li:ownershipType:custom_type_4 | ||
groups: | ||
- group2 | ||
- name: Mixed Standard and URN | ||
description: Term with both standard and URN types | ||
owners: | ||
- type: DEVELOPER | ||
users: | ||
- dev1 | ||
- type: urn:li:ownershipType:custom_type_5 | ||
groups: | ||
- group3 |
188 changes: 188 additions & 0 deletions
188
metadata-ingestion/tests/integration/business-glossary/custom_ownership_urns_golden.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
[ | ||
{ | ||
"proposedSnapshot": { | ||
"com.linkedin.pegasus2avro.metadata.snapshot.GlossaryNodeSnapshot": { | ||
"urn": "urn:li:glossaryNode:Custom URN Types", | ||
"aspects": [ | ||
{ | ||
"com.linkedin.pegasus2avro.glossary.GlossaryNodeInfo": { | ||
"customProperties": {}, | ||
"definition": "Testing custom ownership URN types", | ||
"name": "Custom URN Types" | ||
} | ||
}, | ||
{ | ||
"com.linkedin.pegasus2avro.common.Ownership": { | ||
"owners": [ | ||
{ | ||
"owner": "urn:li:corpuser:user1", | ||
"type": "CUSTOM", | ||
"typeUrn": "urn:li:ownershipType:custom_type_1" | ||
}, | ||
{ | ||
"owner": "urn:li:corpGroup:group1", | ||
"type": "CUSTOM", | ||
"typeUrn": "urn:li:ownershipType:custom_type_1" | ||
}, | ||
{ | ||
"owner": "urn:li:corpuser:user2", | ||
"type": "CUSTOM", | ||
"typeUrn": "urn:li:ownershipType:custom_type_2" | ||
} | ||
], | ||
"ownerTypes": {}, | ||
"lastModified": { | ||
"time": 0, | ||
"actor": "urn:li:corpuser:unknown" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"systemMetadata": { | ||
"lastObserved": 1586847600000, | ||
"runId": "datahub-business-glossary-2020_04_14-07_00_00-dlsmlo", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
"proposedSnapshot": { | ||
"com.linkedin.pegasus2avro.metadata.snapshot.GlossaryTermSnapshot": { | ||
"urn": "urn:li:glossaryTerm:Custom URN Types.Mixed URN Types", | ||
"aspects": [ | ||
{ | ||
"com.linkedin.pegasus2avro.glossary.GlossaryTermInfo": { | ||
"customProperties": {}, | ||
"name": "Mixed URN Types", | ||
"definition": "Term with custom URN types", | ||
"parentNode": "urn:li:glossaryNode:Custom URN Types", | ||
"termSource": "INTERNAL", | ||
"sourceRef": "DataHub", | ||
"sourceUrl": "https://github.com/datahub-project/datahub/" | ||
} | ||
}, | ||
{ | ||
"com.linkedin.pegasus2avro.common.Ownership": { | ||
"owners": [ | ||
{ | ||
"owner": "urn:li:corpuser:user3", | ||
"type": "CUSTOM", | ||
"typeUrn": "urn:li:ownershipType:custom_type_3" | ||
}, | ||
{ | ||
"owner": "urn:li:corpGroup:group2", | ||
"type": "CUSTOM", | ||
"typeUrn": "urn:li:ownershipType:custom_type_4" | ||
} | ||
], | ||
"ownerTypes": {}, | ||
"lastModified": { | ||
"time": 0, | ||
"actor": "urn:li:corpuser:unknown" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"systemMetadata": { | ||
"lastObserved": 1586847600000, | ||
"runId": "datahub-business-glossary-2020_04_14-07_00_00-dlsmlo", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
"proposedSnapshot": { | ||
"com.linkedin.pegasus2avro.metadata.snapshot.GlossaryTermSnapshot": { | ||
"urn": "urn:li:glossaryTerm:Custom URN Types.Mixed Standard and URN", | ||
"aspects": [ | ||
{ | ||
"com.linkedin.pegasus2avro.glossary.GlossaryTermInfo": { | ||
"customProperties": {}, | ||
"name": "Mixed Standard and URN", | ||
"definition": "Term with both standard and URN types", | ||
"parentNode": "urn:li:glossaryNode:Custom URN Types", | ||
"termSource": "INTERNAL", | ||
"sourceRef": "DataHub", | ||
"sourceUrl": "https://github.com/datahub-project/datahub/" | ||
} | ||
}, | ||
{ | ||
"com.linkedin.pegasus2avro.common.Ownership": { | ||
"owners": [ | ||
{ | ||
"owner": "urn:li:corpuser:dev1", | ||
"type": "DEVELOPER" | ||
}, | ||
{ | ||
"owner": "urn:li:corpGroup:group3", | ||
"type": "CUSTOM", | ||
"typeUrn": "urn:li:ownershipType:custom_type_5" | ||
} | ||
], | ||
"ownerTypes": {}, | ||
"lastModified": { | ||
"time": 0, | ||
"actor": "urn:li:corpuser:unknown" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"systemMetadata": { | ||
"lastObserved": 1586847600000, | ||
"runId": "datahub-business-glossary-2020_04_14-07_00_00-dlsmlo", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
"entityType": "glossaryNode", | ||
"entityUrn": "urn:li:glossaryNode:Custom URN Types", | ||
"changeType": "UPSERT", | ||
"aspectName": "status", | ||
"aspect": { | ||
"json": { | ||
"removed": false | ||
} | ||
}, | ||
"systemMetadata": { | ||
"lastObserved": 1586847600000, | ||
"runId": "datahub-business-glossary-2020_04_14-07_00_00-dlsmlo", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
"entityType": "glossaryTerm", | ||
"entityUrn": "urn:li:glossaryTerm:Custom URN Types.Mixed Standard and URN", | ||
"changeType": "UPSERT", | ||
"aspectName": "status", | ||
"aspect": { | ||
"json": { | ||
"removed": false | ||
} | ||
}, | ||
"systemMetadata": { | ||
"lastObserved": 1586847600000, | ||
"runId": "datahub-business-glossary-2020_04_14-07_00_00-dlsmlo", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
"entityType": "glossaryTerm", | ||
"entityUrn": "urn:li:glossaryTerm:Custom URN Types.Mixed URN Types", | ||
"changeType": "UPSERT", | ||
"aspectName": "status", | ||
"aspect": { | ||
"json": { | ||
"removed": false | ||
} | ||
}, | ||
"systemMetadata": { | ||
"lastObserved": 1586847600000, | ||
"runId": "datahub-business-glossary-2020_04_14-07_00_00-dlsmlo", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
} | ||
] |
39 changes: 39 additions & 0 deletions
39
metadata-ingestion/tests/integration/business-glossary/multiple_owners_different_types.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
version: "1" | ||
source: DataHub | ||
owners: | ||
users: | ||
- mjames | ||
url: "https://github.com/datahub-project/datahub/" | ||
|
||
nodes: | ||
- name: Different Owner Types | ||
description: Testing multiple owners with different types | ||
owners: | ||
- type: DEVELOPER | ||
users: | ||
- dev1 | ||
groups: | ||
- engineering | ||
- type: DATAOWNER | ||
users: | ||
- owner1 | ||
groups: | ||
- data_stewards | ||
- type: PRODUCER | ||
users: | ||
- producer1 | ||
terms: | ||
- name: Mixed Ownership | ||
description: Term with different owner types | ||
owners: | ||
- type: STAKEHOLDER | ||
users: | ||
- stakeholder1 | ||
groups: | ||
- business | ||
- type: DEVELOPER | ||
users: | ||
- dev2 | ||
- type: DATAOWNER | ||
groups: | ||
- compliance |
Oops, something went wrong.