How to Retrieve Related Entities for Glossary Term Graph in DataHub?

Original Slack Thread

Hello ,
Does anyone here know how to get related terms, related entities for glossary term graph wl. Thank you

Hey there! :wave: Make sure your message includes the following information if relevant, so we can help more effectively!

  1. Which DataHub version are you using? (e.g. 0.12.0)
  2. Please post any relevant error logs on the thread!
    glossaryNode(urn: $urn) {
        urn
        children: relationships(
            input: {
                types: ["IsPartOf"]
                direction: INCOMING
                start: 0
                count: 100
            }
        ) {
            total
            relationships {
                direction
                entity {
                    type
                    urn
                    ... on GlossaryNode {
                         properties {
                            name
                        }
                    }
                    ... on GlossaryTerm {
                         properties {
                            name
                        }
                    }
                }
            }
        }
    }
}```

Thabk you <@U0445MUD81W> . But this only shows node and term relations.
Is there also a way to get entities(datasets, assets) attached to a glossary?

  searchAcrossEntities(input: $input) {
    start
    count
    total
    searchResults {
      entity {
        urn
        type
        ... on Dataset {
          ...nonSiblingsDatasetSearchFields
          siblings {
            isPrimary
            siblings {
              urn
              type
              ... on Dataset {
                ...nonSiblingsDatasetSearchFields
              }
            }
          }
        }
        ... on Dashboard {
          dashboardId
          properties {
            name
            description
          }
          glossaryTerms {
            ...glossaryTerms
          }
        }
        ... on Chart {
          chartId
          properties {
            name
            description
            type
          }
          glossaryTerms {
            ...glossaryTerms
          }
        }
        ... on GlossaryTerm {
          name
          hierarchicalName
          properties {
            name
            description
            termSource
            sourceRef
            sourceUrl
          }
        }
        ... on GlossaryNode {
          ...glossaryNode
          parentNodes {
              count
  nodes {
    urn
    type
    properties {
      name
    }
  }
          }
        }
      }
      matchedFields {
        name
        value
      }
    }
  }
}

fragment nonSiblingsDatasetSearchFields on Dataset {
  exists
  name
  platformNativeType
  properties {
    name
    description
  }
  glossaryTerms {
    ...glossaryTerms
  }
}

fragment glossaryTerms on GlossaryTerms {
  terms {
    term {
      ...glossaryTerm
    }
    associatedUrn
  }
}

fragment glossaryTerm on GlossaryTerm {
  urn
  name
  type
  hierarchicalName
  properties {
    name
    description
    definition
    termSource
    customProperties {
      key
      value
    }
  }
}

fragment glossaryNode on GlossaryNode {
  urn
  type
  properties {
    name
  }
  children: relationships(
    input: {types: ["IsPartOf"], direction: INCOMING, start: 0, count: 10000}
  ) {
    total
  }
}```

variables:

  "input": {
    "types": [],
    "query": "*",
    "start": 0,
    "count": 10,
    "orFilters": [
      {
        "and": [
          {
            "field": "glossaryTerms",
            "values": [
              "urn:li:glossaryTerm:Classification.Confidential"
            ]
          }
        ]
      },
      {
        "and": [
          {
            "field": "fieldGlossaryTerms",
            "values": [
              "urn:li:glossaryTerm:Classification.Confidential"
            ]
          }
        ]
      }
    ]
  }
}```

Thank you <@U0445MUD81W>