Deleting all queries in the query tab and encountering search issues with non-searchable entity type QUERY

Original Slack Thread

How do I delete all the queries in the query tab? I gave it a try with datahub delete --query "urn:li:query:*" -n this comment but got Found no urns to delete. Maybe you want to change your filters to be something different?

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!

Version 0.11.0

I gave it a try with GraphQL query:

    searchAcrossEntities(input: {
        start: 0,
        count: 100,
        query: "*",
        types: [QUERY]
    }
    ) {
        searchResults {
            entity {
                urn,
                __typename
            }
        }
    }
}```

Got this error:

    "errors": [
        {
            "message": "An unknown error occurred.",
            "locations": [
                {
                    "line": 2,
                    "column": 5
                }
            ],
            "path": [
                "searchAcrossEntities"
            ],
            "extensions": {
                "code": 500,
                "type": "SERVER_ERROR",
                "classification": "DataFetchingException"
            }
        }
    ],
    "data": {
        "searchAcrossEntities": null
    },
    "extensions": {}
}```

Is entity type QUERY not searchable? I don’t see it listed https://github.com/datahub-project/datahub/blob/43deb7080af17486f66a7b1249af17035e595494/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/search/SearchUtils.java|here in SEARCHABLE_ENTITY_TYPES. Is there any workaround?

Search is meant to return search results. I think you’re looking to scroll through the entities’ aspects. The graphql is here (https://datahubproject.io/docs/graphql/queries/#scrollacrossentities) and I know that the OpenAPI endpoint supports listing using scroll as well and deleting but not in bulk. The OpenAPI endpoint is here: https://demo.datahubproject.io/openapi/swagger-ui/index.html#/query%20Entity/scroll_4 (unfortunately there are no queries on the demo system). The test urns use uuids like this

````urn:li:query:eed2e3f4-8574-4823-9c09-4a5742fbbeef`⁣```