Hello! I have been having issues accessing glossar...
# troubleshoot
b
Hello! I have been having issues accessing glossaryTerms on fields using gql queries. I have been using the query
search
and this returns everything as expected except the glossaryTerms on a field which it returns null. Has anyone seen this issue before? Query and schema pictures in thread:
Query :
Copy code
query my_search($input: SearchInput!) {
            search(input: $input) {
                start
                count
                total
                searchResults {
                    entity {
                        ...dataset
                    }
                }
            }
        }

        fragment dataset on Dataset {
            type
            schemaMetadata {
                fields{
                    ...fields
                }
            }
            properties {
                ...datasetProperties
            }
        }

        fragment fields on SchemaField {
            fieldPath
          	label
            description
            tags {
                ...globalTags
            }
            glossaryTerms {
                ...glossaryTerms
            }
        }

        fragment globalTags on GlobalTags {
            tags {
                tag {
                    properties {
                        name
                        description
                    }
                }
            }
        }

        fragment glossaryTerms on GlossaryTerms {
            terms {
                term {
                  	urn
                  	hierarchicalName
                    properties {
                        name
                        description
                        customProperties {
                            key
                            value
                        }
                    }
                }
            }
        }

{"input": {
                    "type": "DATASET",
                    "start": 0,
                    "count": 3000,
                    "query": "SampleKafkaDataset"
          }
}
Response:
Copy code
"searchResults": [
        {
          "entity": {
            "type": "DATASET",
            "schemaMetadata": {
              "fields": [
                {
                  "fieldPath": "[version=2.0].[type=boolean].field_foo_2",
                  "label": null,
                  "description": "Foo field description",
                  "tags": {
                    "tags": [
                      {
                        "tag": {
                          "properties": {
                            "name": "NeedsDocumentation",
                            "description": "Indicates the data element needs documentation"
                          }
                        }
                      }
                    ]
                  },
                  "glossaryTerms": null
                },
                {
                  "fieldPath": "[version=2.0].[type=boolean].field_bar",
                  "label": null,
                  "description": "Bar field description",
                  "tags": null,
                  "glossaryTerms": null
                },
                {
                  "fieldPath": "[version=2.0].[key=True].[type=int].id",
                  "label": null,
                  "description": "Id specifying which partition the message should go to",
                  "tags": null,
                  "glossaryTerms": null
                }
              ]
            },
            "properties": {
              "name": "SampleKafkaDataset",
              "description": null,
              "customProperties": [
                {
                  "key": "prop2",
                  "value": "pikachu"
                },
                {
                  "key": "prop1",
                  "value": "fakeprop"
                }
              ]
            }
          }
        }
]
Dataset from UI:
Follow Up: It seems like the tags were in the editableSchemaMetadata and not SchemaMetadata. I am curious what the difference is but that seemed to be my solution! Thanks!
e
That’s great to hear! You can read more about editableSchemaMetadata here https://datahubproject.io/docs/generated/metamodel/entities/dataset/#editableschemametadata
Let me know if you have any questions