Updating Tags in Glossary/Glossary-term, removes Tags from child Glossary-terms
Affected module Does it impact the UI, backend or Ingestion Framework? - Backend
Describe the bug On updating Tags in Glossary/Glossary-term, Tags from child Glossary terms are removed automatically
To Reproduce
https://user-images.githubusercontent.com/86726556/158898774-5550b006-ab5b-4fdc-ae3c-c2c06bc97e2a.mov
Expected behavior Updating Tags in Glossary/Glossary-term should not remove Tags from it's child Glossary-terms
Version:
- OS: [e.g. iOS]
- Python version:
- OpenMetadata version: [e.g. 0.8]
- OpenMetadata Ingestion package version: [e.g.
openmetadata-ingestion[docker]==XYZ]
Additional context None
CC: @harshach @sureshms
@darth-coder00, need to know what API calls you are using and the responses beyond the UI behavior.
@sureshms,
Patch API to add tags to glossary term:
URL:
http://localhost:8585/api/v1/glossaryTerms/a5a97523-2229-41e5-abbe-65f61a534c34
Request Data:
[{"op":"add","path":"/tags/0","value":{"labelType":"Manual","state":"Confirmed","source":"Tag","tagFQN":"PII.None"}}]
Response:
{
"id": "a5a97523-2229-41e5-abbe-65f61a534c34",
"name": "Clothing",
"displayName": "Clothing",
"description": "Every term in the glossary has a unique definition. Along with defining the standard term for a concept, the synonyms as well as related terms (for e.g., parent and child terms) can be specified. References can be added to the assets related to the terms. New terms can be added or updated to the Glossary. The glossary terms can be reviewed by certain users, who can accept or reject the terms.",
"fullyQualifiedName": "Business Glossary.Clothing",
"synonyms": [],
"glossary": {
"id": "96a3e792-aef8-4361-9c0c-cf90b3068431",
"type": "glossary",
"name": "Business Glossary",
"description": "A Glossary is a controlled vocabulary used to define the concepts and terminology in an organization. Glossaries can be specific to a certain domain (for e.g., Business Glossary, Technical Glossary). In the glossary, the standard terms and concepts can be defined along with the synonyms, and related terms. Control can be established over how and who can add the terms in the glossary.",
"displayName": "Business Glossary",
"deleted": false,
"href": "http://localhost:8585/api/v1/glossaries/96a3e792-aef8-4361-9c0c-cf90b3068431"
},
"relatedTerms": [
{
"id": "a0a7b115-06cc-4165-8b67-06736380e99b",
"type": "glossaryTerm",
"name": "Business Glossary.Clothing.Topwear.Shirt",
"displayName": "Shirt",
"deleted": false,
"href": "http://localhost:8585/api/v1/glossaryTerms/a0a7b115-06cc-4165-8b67-06736380e99b"
},
{
"id": "a3b9fafc-683e-4265-bf28-6d2dda729d0e",
"type": "glossaryTerm",
"name": "Business Glossary.Clothing.Topwear.Tshirt",
"displayName": "Tshirt",
"deleted": false,
"href": "http://localhost:8585/api/v1/glossaryTerms/a3b9fafc-683e-4265-bf28-6d2dda729d0e"
},
{
"id": "2fd77a32-cc17-4bf2-a28a-abab8270e87d",
"type": "glossaryTerm",
"name": "Business Glossary.Clothing.Topwear",
"displayName": "Topwear",
"deleted": false,
"href": "http://localhost:8585/api/v1/glossaryTerms/2fd77a32-cc17-4bf2-a28a-abab8270e87d"
},
{
"id": "a63f7a75-e8bd-4003-811a-1aceb4f776a2",
"type": "glossaryTerm",
"name": "Business Glossary.Clothing.Bottomwear",
"displayName": "Bottomwear",
"deleted": false,
"href": "http://localhost:8585/api/v1/glossaryTerms/a63f7a75-e8bd-4003-811a-1aceb4f776a2"
}
],
"references": [
{
"name": "asda",
"endpoint": "http://example.com"
}
],
"version": 1.3,
"updatedAt": 1647931273177,
"updatedBy": "anonymous",
"href": "http://localhost:8585/api/v1/glossaryTerms/a5a97523-2229-41e5-abbe-65f61a534c34",
"reviewers": [
{
"id": "7cde36e8-0df5-46ea-a15f-74c6c4fc6575",
"type": "user",
"name": "aaron_johnson0",
"displayName": "Aaron Johnson",
"deleted": false,
"href": "http://localhost:8585/api/v1/users/7cde36e8-0df5-46ea-a15f-74c6c4fc6575"
},
{
"id": "b36bd798-0cba-4a07-94e7-48b5294b04a5",
"type": "user",
"name": "caitlin_wilkins0",
"displayName": "Caitlin Wilkins",
"deleted": false,
"href": "http://localhost:8585/api/v1/users/b36bd798-0cba-4a07-94e7-48b5294b04a5"
},
{
"id": "f01eec52-38c5-43bf-8d05-9a84abc4de11",
"type": "user",
"name": "barbara_fox5",
"displayName": "Barbara Fox",
"deleted": false,
"href": "http://localhost:8585/api/v1/users/f01eec52-38c5-43bf-8d05-9a84abc4de11"
}
],
"tags": [
{
"tagFQN": "PII.None",
"source": "Tag",
"labelType": "Manual",
"state": "Confirmed"
}
],
"changeDescription": {
"fieldsAdded": [
{
"name": "tags",
"newValue": "[{\"tagFQN\":\"PII.None\",\"source\":\"Tag\",\"labelType\":\"Manual\",\"state\":\"Confirmed\"}]"
}
],
"fieldsUpdated": [],
"fieldsDeleted": [],
"previousVersion": 1.2
},
"status": "Draft",
"deleted": false
}
Patch API to add tags to glossary:
URL:
http://localhost:8585/api/v1/glossaries/96a3e792-aef8-4361-9c0c-cf90b3068431
Request Data:
[{"op":"add","path":"/tags/0","value":{"labelType":"Manual","state":"Confirmed","source":"Tag","tagFQN":"PersonalData.SpecialCategory"}}]
Response:
{
"id": "96a3e792-aef8-4361-9c0c-cf90b3068431",
"name": "Business Glossary",
"displayName": "Business Glossary",
"description": "A Glossary is a controlled vocabulary used to define the concepts and terminology in an organization. Glossaries can be specific to a certain domain (for e.g., Business Glossary, Technical Glossary). In the glossary, the standard terms and concepts can be defined along with the synonyms, and related terms. Control can be established over how and who can add the terms in the glossary.",
"version": 0.5,
"updatedAt": 1647931603438,
"updatedBy": "anonymous",
"href": "http://localhost:8585/api/v1/glossaries/96a3e792-aef8-4361-9c0c-cf90b3068431",
"reviewers": [
{
"id": "7cde36e8-0df5-46ea-a15f-74c6c4fc6575",
"type": "user",
"name": "aaron_johnson0",
"displayName": "Aaron Johnson",
"deleted": false,
"href": "http://localhost:8585/api/v1/users/7cde36e8-0df5-46ea-a15f-74c6c4fc6575"
},
{
"id": "b36bd798-0cba-4a07-94e7-48b5294b04a5",
"type": "user",
"name": "caitlin_wilkins0",
"displayName": "Caitlin Wilkins",
"deleted": false,
"href": "http://localhost:8585/api/v1/users/b36bd798-0cba-4a07-94e7-48b5294b04a5"
},
{
"id": "f01eec52-38c5-43bf-8d05-9a84abc4de11",
"type": "user",
"name": "barbara_fox5",
"displayName": "Barbara Fox",
"deleted": false,
"href": "http://localhost:8585/api/v1/users/f01eec52-38c5-43bf-8d05-9a84abc4de11"
}
],
"owner": {
"id": "7cde36e8-0df5-46ea-a15f-74c6c4fc6575",
"type": "user",
"name": "aaron_johnson0",
"displayName": "Aaron Johnson",
"deleted": false,
"href": "http://localhost:8585/api/v1/users/7cde36e8-0df5-46ea-a15f-74c6c4fc6575"
},
"tags": [
{
"tagFQN": "PersonalData.SpecialCategory",
"source": "Tag",
"labelType": "Manual",
"state": "Confirmed"
}
],
"changeDescription": {
"fieldsAdded": [
{
"name": "tags",
"newValue": "[{\"tagFQN\":\"PersonalData.SpecialCategory\",\"source\":\"Tag\",\"labelType\":\"Manual\",\"state\":\"Confirmed\"}]"
}
],
"fieldsUpdated": [],
"fieldsDeleted": [],
"previousVersion": 0.4
},
"deleted": false
}
Facing issue in Glossary-term after adding tags to Glossary,
Get API for Glossary-term that had tags added earlier
URL:
http://localhost:8585/api/v1/glossaryTerms/name/Business%20Glossary.Clothing?fields=children,relatedTerms,reviewers,tags
Response:
{
"id": "a5a97523-2229-41e5-abbe-65f61a534c34",
"name": "Clothing",
"displayName": "Clothing",
"description": "Every term in the glossary has a unique definition. Along with defining the standard term for a concept, the synonyms as well as related terms (for e.g., parent and child terms) can be specified. References can be added to the assets related to the terms. New terms can be added or updated to the Glossary. The glossary terms can be reviewed by certain users, who can accept or reject the terms.",
"fullyQualifiedName": "Business Glossary.Clothing",
"synonyms": [],
"glossary": {
"id": "96a3e792-aef8-4361-9c0c-cf90b3068431",
"type": "glossary",
"name": "Business Glossary",
"description": "A Glossary is a controlled vocabulary used to define the concepts and terminology in an organization. Glossaries can be specific to a certain domain (for e.g., Business Glossary, Technical Glossary). In the glossary, the standard terms and concepts can be defined along with the synonyms, and related terms. Control can be established over how and who can add the terms in the glossary.",
"displayName": "Business Glossary",
"deleted": false,
"href": "http://localhost:8585/api/v1/glossaries/96a3e792-aef8-4361-9c0c-cf90b3068431"
},
"children": [
{
"id": "2fd77a32-cc17-4bf2-a28a-abab8270e87d",
"type": "glossaryTerm",
"name": "Business Glossary.Clothing.Topwear",
"displayName": "Topwear",
"deleted": false,
"href": "http://localhost:8585/api/v1/glossaryTerms/2fd77a32-cc17-4bf2-a28a-abab8270e87d"
},
{
"id": "a63f7a75-e8bd-4003-811a-1aceb4f776a2",
"type": "glossaryTerm",
"name": "Business Glossary.Clothing.Bottomwear",
"displayName": "Bottomwear",
"deleted": false,
"href": "http://localhost:8585/api/v1/glossaryTerms/a63f7a75-e8bd-4003-811a-1aceb4f776a2"
}
],
"relatedTerms": [
{
"id": "a0a7b115-06cc-4165-8b67-06736380e99b",
"type": "glossaryTerm",
"name": "Business Glossary.Clothing.Topwear.Shirt",
"displayName": "Shirt",
"deleted": false,
"href": "http://localhost:8585/api/v1/glossaryTerms/a0a7b115-06cc-4165-8b67-06736380e99b"
},
{
"id": "a3b9fafc-683e-4265-bf28-6d2dda729d0e",
"type": "glossaryTerm",
"name": "Business Glossary.Clothing.Topwear.Tshirt",
"displayName": "Tshirt",
"deleted": false,
"href": "http://localhost:8585/api/v1/glossaryTerms/a3b9fafc-683e-4265-bf28-6d2dda729d0e"
},
{
"id": "2fd77a32-cc17-4bf2-a28a-abab8270e87d",
"type": "glossaryTerm",
"name": "Business Glossary.Clothing.Topwear",
"displayName": "Topwear",
"deleted": false,
"href": "http://localhost:8585/api/v1/glossaryTerms/2fd77a32-cc17-4bf2-a28a-abab8270e87d"
},
{
"id": "a63f7a75-e8bd-4003-811a-1aceb4f776a2",
"type": "glossaryTerm",
"name": "Business Glossary.Clothing.Bottomwear",
"displayName": "Bottomwear",
"deleted": false,
"href": "http://localhost:8585/api/v1/glossaryTerms/a63f7a75-e8bd-4003-811a-1aceb4f776a2"
}
],
"references": [
{
"name": "asda",
"endpoint": "http://example.com"
}
],
"version": 1.3,
"updatedAt": 1647931273177,
"updatedBy": "anonymous",
"href": "http://localhost:8585/api/v1/glossaryTerms/a5a97523-2229-41e5-abbe-65f61a534c34",
"reviewers": [
{
"id": "7cde36e8-0df5-46ea-a15f-74c6c4fc6575",
"type": "user",
"name": "aaron_johnson0",
"displayName": "Aaron Johnson",
"deleted": false,
"href": "http://localhost:8585/api/v1/users/7cde36e8-0df5-46ea-a15f-74c6c4fc6575"
},
{
"id": "b36bd798-0cba-4a07-94e7-48b5294b04a5",
"type": "user",
"name": "caitlin_wilkins0",
"displayName": "Caitlin Wilkins",
"deleted": false,
"href": "http://localhost:8585/api/v1/users/b36bd798-0cba-4a07-94e7-48b5294b04a5"
},
{
"id": "f01eec52-38c5-43bf-8d05-9a84abc4de11",
"type": "user",
"name": "barbara_fox5",
"displayName": "Barbara Fox",
"deleted": false,
"href": "http://localhost:8585/api/v1/users/f01eec52-38c5-43bf-8d05-9a84abc4de11"
}
],
"tags": [],
"changeDescription": {
"fieldsAdded": [
{
"name": "tags",
"newValue": "[{\"tagFQN\":\"PII.None\",\"source\":\"Tag\",\"labelType\":\"Manual\",\"state\":\"Confirmed\"}]"
}
],
"fieldsUpdated": [],
"fieldsDeleted": [],
"previousVersion": 1.2
},
"status": "Draft",
"deleted": false
}
Tags array is empty
CC: @sureshms