Troubleshooting GraphQL: Extracting Table and Field Info with Glossary Terms

Original Slack Thread

Hello everyone! Need help on graphql. I am planning to extract the table info and fields. But I want to get the glossary associated with the tables and columns. But when I am adding it to my graphql, its just showing null. Can someone help me?

Here is my query:

  search(input: {type: DATASET, query: "db.schema.*", start: 0, count: 300}) {
        start
        count
        total
        searchResults {
            entity {
                urn
                ... on Dataset {
                    schemaMetadata(version: -1) {
                        name
                        platformUrn
                        version
                        fields {
                            fieldPath
                            label
                            jsonPath
                            nullable
                            description
                            type
                            nativeDataType
                            recursive
                            isPartOfKey
                          	glossaryTerms {
                              ... on GlossaryTerms {
                                terms {
                                  term {
                                    urn
                                  }
                                }
                              }
                            }
                            
                        }
                        primaryKeys
                    }
                }
            }
        }
  }
}```

try this one

  searchAcrossEntities(input: $input) {
        start
        count
        total
        searchResults {
            entity {
                urn
                ... on Dataset {
                    urn
                    properties {
                        name
                        description
                    }
                    glossaryTerms {
                        terms {
                            term {
                                    urn
                                    type
                                    hierarchicalName
                                    properties {
                                        name
                                        description
                                        termSource
                                        customProperties {
                                        key
                                        value
                                        }
                                    }
                            }
                            associatedUrn
                        }
                    }
                    schemaMetadata(version: -1) {
                        name
                        platformUrn
                        version
                
                        fields {
                            fieldPath
                            label
                            jsonPath
                            nullable
                            description
                            type
                            nativeDataType
                            recursive
                            isPartOfKey
                          	glossaryTerms {
                              ... on GlossaryTerms {
                                terms {
                                  term {
                                    urn
                                  }
                                }
                              }
                            }
                            
                        }
                        primaryKeys
                    }
                }
            }
        }
  }
}```

input:

  "input": {
    "types": [],
    "query": "pet_profiles",
    "start": 0,
    "count": 10

   
  }
}```

Hello <@U0445MUD81W>, still having null :disappointed: Although I have associated the term to the column

Also even description is null but as you can see in the screenshot above, I have added the description as well

The table level terms I can see but not the column level

try this one

  searchAcrossEntities(input: $input) {
    start
    count
    total
    searchResults {
      entity {
        urn
        ... on Dataset {
          urn
          properties {
            name
            description
          }
          glossaryTerms {
            terms {
              term {
                urn
                type
                hierarchicalName
                properties {
                  name
                  description
                  termSource
                  customProperties {
                    key
                    value
                  }
                }
              }
              associatedUrn
            }
          }
          editableSchemaMetadata {
            editableSchemaFieldInfo {
              fieldPath
              description
              glossaryTerms {
                terms {
                  term {
                    urn
                    type
                    hierarchicalName
                    properties {
                      name
                      description
                      termSource
                      customProperties {
                        key
                        value
                      }
                    }
                  }
                  associatedUrn
                }
              }
            }
          }
          schemaMetadata(version: -1) {
            name
            platformUrn
            version
            fields {
              fieldPath
              label
              jsonPath
              nullable
              description
              type
              nativeDataType
              recursive
              isPartOfKey
            }
            primaryKeys
          }
        }
      }
    }
  }
}```

It works now! Thank you very much!