Hi guys, is there a way to fetch dataset from grap...
# troubleshoot
c
Hi guys, is there a way to fetch dataset from graphql with a specific COLUMN tag?:
Copy code
search(
            input: {start: 0, count: 10, query: "*", type: DATASET, filters: {field: "tags", value: "urn:li:tag:Phone"} }
        ) {
            searchResults {
                entity {
                    urn
                    type
                }
                matchedFields {
                    name
                    value
                }
            }
        }
    }
im trying something like this, works with table tags but not with the column ones
h
@green-football-43791, could you help with this question?
g
you want to select editableSchemaMetadata for tags youve applied via the graphql api:
Copy code
editableSchemaMetadata {
            editableSchemaFieldInfo {
                fieldPath
                description
                globalTags {
                    ...globalTagsFields
                }
                glossaryTerms {
                    ...glossaryTerms
                }
            }
        }
or for tags applied in ingestion:
Copy code
schemaMetadata {
   schemaFieldInfo {
     fieldPath
     globalTags {
       ...globalTagsFields
     }
   }
}
c
thanks for the answer 🙂 what i would like to do is to find a dataset using a specific tag and get all the tags associated to that dataset included the column tags, im trying to use the search functionality and get as a result all the tags from a dataset, i think the EditableSchemaMetadata only works when querying instead of searching?, something like this:
Copy code
{
    search(
        input: {start: 0, count: 10, query: "*", type: DATASET, filters: {field: "tags", value: "urn:li:tag:PII_by_data"} }
    ) editableSchemaMetadata {
            editableSchemaFieldInfo {
                fieldPath
                description
                globalTags {
                    tags{tag {
                      name
                      description
                    }}
                }
            }
        }
}
g
you want that editableSchemaMetadat selector to be inside of the dataset
Copy code
search(
            input: {start: 0, count: 10, query: "*", type: DATASET, filters: {field: "tags", value: "urn:li:tag:Phone"} }
        ) {
            searchResults {
                entity {
                    urn
                    type
                    ...on Dataset {
                       <select your other fields here>
                    }
                }
                matchedFields {
                    name
                    value
                }
            }
        }
    }
in that <select your other fields here> area
btw
you can use the
/api/graphiql
ui to play around with queries
and you also get typeahead there
so you can understand our model better
c
Thank you very mucho 🙂 that is what i was searching for
a
Good call on the editableSchemaMetadata.. I was using the SchemaMetadata and getting all nulls for tags/terms.
@clever-air-4600 Were you able to get this to work? I'm trying to do the same thing with terms and the filter is only hitting at the table level and not the column level.