Why does my ADX cluster policy request classification fail?

Gavin Cheung 5 Reputation points
2023-12-18T16:55:18.08+00:00

I created a custom Workload Group called "ConcurrentWorkloadGroup". I then attempt to create a policy request classification with the following KQL command:

.alter cluster policy request_classification '{"IsEnabled":true}' <|
    iff(
        request_properties.request_type == "Query"
        and request_properties.current_database == "<db_name>"
        and request_properties.request_description  == "concurrent",
        "ConcurrentWorkloadGroup",
        "default"
    )

I attempt to query using the new Workload Group:

set request_description = "concurrent";
<db_name>
| take 10

When I run .show queries to check the Workload Group, it shows the query uses the default group. When I remove the request_description line, the query uses the new Workload Group.

Ultimately, I want to be able to choose which Workload Group is being used from a subset of my queries, so I welcome other ways to achieve this so long is it doesn't affect the group of other queries.

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
487 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Gavin Cheung 5 Reputation points
    2023-12-19T09:39:24.02+00:00

    Reading this (https://learn.microsoft.com/en-us/azure/data-explorer/kusto/api/rest/request-properties), I thought I would be able to set the property using the KQL set statement.

    I've now found a note in another separate doc saying this cannot be done with the set statement.

    User's image

    1 person found this answer helpful.