OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

Not getting proper relation between parent and child glossary-terms

Open darth-coder00 opened this issue 4 years ago • 1 comments

Affected module Does it impact the UI, backend or Ingestion Framework? - Backend

Describe the bug Not getting proper relation between parent and child glossary-terms

To Reproduce

  1. Create Glossary
{
"id": "d5f30b7f-9686-4ef6-a520-d72b30700e78",
"name": "glossary1",
"displayName": "Glossary 1",
"description": "string",
"version": 0.1,
"updatedAt": 1645211585977,
"updatedBy": "anonymous",
"href": "http://localhost:8585/api/v1/glossaries/d5f30b7f-9686-4ef6-a520-d72b30700e78",
"reviewers": [ ],
"deleted": false
}
  1. Create Glossary term (Root/Parent) (glossaryterm1) Request Payload:
{
  "description": "string",
  "displayName": "Glossary Term 1",
  "glossary": {
    "id": "d5f30b7f-9686-4ef6-a520-d72b30700e78",
    "type": "glossary"
  },
  "name": "glossaryterm1",
}

Response status: 200

  1. Create Glossary term (Child) (glossaryterm11) Request Payload:
{
  "description": "string",
  "displayName": "Glossary Term 11",
  "glossary": {
    "id": "d5f30b7f-9686-4ef6-a520-d72b30700e78",
    "type": "glossary"
  },
  "name": "glossaryterm11",
  "parent": {
    "id": "247e237a-7c0d-4973-8adf-32859072c583",
    "type": "glossaryTerm"
  }
}

Response status: 200

  1. Query all Glossary terms /api/v1/glossaryTerms Response Data:
{
  "data": [
    {
      "id": "247e237a-7c0d-4973-8adf-32859072c583",
      "name": "glossaryterm1",
      "displayName": "Glossary Term 1",
      "description": "string",
      "fullyQualifiedName": "glossary1.glossaryterm1",
      "synonyms": [],
      "glossary": {
        "id": "d5f30b7f-9686-4ef6-a520-d72b30700e78",
        "type": "glossary",
        "name": "glossary1",
        "description": "string",
        "displayName": "Glossary 1",
        "href": "http://localhost:8585/api/v1/glossaries/d5f30b7f-9686-4ef6-a520-d72b30700e78"
      },
      "children": [
        {
          "id": "86e3cf7b-742d-4d20-8012-ca83e7fde2e5",
          "type": "glossaryTerm",
          "name": "null.glossaryterm11",
          "description": "string",
          "displayName": "Glossary Term 11"
        }
      ],
      "version": 0.1,
      "updatedAt": 1645211961781,
      "updatedBy": "anonymous",
      "href": "http://localhost:8585/api/v1/glossaryTerms/247e237a-7c0d-4973-8adf-32859072c583",
      "status": "Draft",
      "deleted": false
    },
    {
      "id": "86e3cf7b-742d-4d20-8012-ca83e7fde2e5",
      "name": "glossaryterm11",
      "displayName": "Glossary Term 11",
      "description": "string",
      "fullyQualifiedName": "null.glossaryterm11",
      "synonyms": [],
      "glossary": {
        "id": "d5f30b7f-9686-4ef6-a520-d72b30700e78",
        "type": "glossary",
        "name": "glossary1",
        "description": "string",
        "displayName": "Glossary 1",
        "href": "http://localhost:8585/api/v1/glossaries/d5f30b7f-9686-4ef6-a520-d72b30700e78"
      },
      "children": [
        {
          "id": "247e237a-7c0d-4973-8adf-32859072c583",
          "type": "glossaryTerm",
          "name": "glossary1.glossaryterm1",
          "description": "string",
          "displayName": "Glossary Term 1"
        }
      ],
      "version": 0.1,
      "updatedAt": 1645212074909,
      "updatedBy": "anonymous",
      "href": "http://localhost:8585/api/v1/glossaryTerms/86e3cf7b-742d-4d20-8012-ca83e7fde2e5",
      "status": "Draft",
      "deleted": false
    }
  ],
  "paging": {
    "total": 2
  }
} 

Expected behavior glossaryterm1 should have glossaryterm11 as children

Actual behavior glossaryterm1 and glossaryterm11 both are present in each other's children Also fullyQualifiedName of glossaryterm11 has null in it

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

darth-coder00 avatar Feb 21 '22 15:02 darth-coder00

@darth-coder00, I could not repro this... Can you send requests/responses you are getting for each of the above commands? Do you have the latest code?

sureshms avatar Feb 22 '22 07:02 sureshms