Query Hash missing

FatemaMalu
New Contributor II

From the following Databricks API  /api/2.0/preview/sql/queries query_hash is missing from the actual response.

But the sample response mentioned in the API documentation has it.

{
  "count": 0,
  "page": 0,
  "page_size": 0,
  "results": [
    {
      "id": "dee5cca8-1c79-4b5e-a711-e7f9d241bdf6",
      "parent": "folders/2025532471912059",
      "latest_query_data_id": "46697357-0db7-47dd-ae4c-850f5b060287",
      "name": "Orders by month by customer",
      "description": "Summarizes total order dollars for customers in the Europe/Asia region.",
      "query": "SELECT field FROM table WHERE field = {{ param }}",
      "query_hash": "string",
      "is_archived": true,
      "is_draft": true,
      "updated_at": "2021-01-07T20:29:24.289Z",
      "created_at": "2020-12-15T18:39:15.837Z",
      "data_source_id": "0c205e24-5db2-4940-adb1-fb13c7ce960b",
      "options": {
        "moved_to_trash_at": "2019-08-24T14:15:22Z",
        "parameters": [
          {
            "title": "string",
            "name": "string",
            "type": "text",
            "value": {}
          }
        ]
      },
      "tags": [
        "string"
      ],
      "is_safe": false,
      "user_id": 899619779028913,
      "last_modified_by_id": 0,
      "visualizations": [
        {
          "id": "string",
          "type": "string",
          "name": "string",
          "description": "string",
          "options": {},
          "updated_at": "2019-08-24T14:15:22Z",
          "created_at": "2019-08-24T14:15:22Z"
        }
      ],
      "is_favorite": true,
      "user": {
        "id": 0,
        "name": "string",
        "email": "user@example.com"
      },
      "last_modified_by": {
        "id": 0,
        "name": "string",
        "email": "user@example.com"
      },
      "can_edit": true,
      "permission_tier": "CAN_VIEW",
      "run_as_role": "viewer"
    }
  ]
}

 

Hi @Retired_mod, I did try fetching uniquely using the id field as well, couldn't get query_hash.