Query consistency policy

Applies to: ✅ Azure Data Explorer

A workload group's query consistency policy allows specifying options that control the consistency mode of queries.

The policy object

Each option consists of:

  • A typed Value - the value of the limit.
  • IsRelaxable - a boolean value that defines if the option can be relaxed by the caller, as part of the request's request properties. Default is true.

The following limits are configurable:

Name Type Description Supported values Default value Matching client request property
QueryConsistency QueryConsistency The consistency mode to use. Strong, Weak, or WeakAffinitizedByQuery, WeakAffinitizedByDatabase Strong queryconsistency
CachedResultsMaxAge timespan The maximum age of cached query results that can be returned. A non-negative timespan null query_results_cache_max_age

Note

The default value applies in the following cases:

  • The policy isn't defined, and the client request option isn't set.
  • The policy is defined, the option isn't defined, and the client request option isn't set.
  • The policy is defined, the option is defined with null as its Value, and the client request option isn't set.

Example

"QueryConsistencyPolicy": {
  "QueryConsistency": {
    "IsRelaxable": true,
    "Value": "Weak"
  },
  "CachedResultsMaxAge": {
    "IsRelaxable": true,
    "Value": "05:00:00"
  }
}