Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to:✅ Azure Data Explorer
Sets the cluster's query weak consistency policy, overriding the current policy, and then returns the updated policy. The updated policy can be later viewed using the show command. If not altered, the default policy applies.
You must have AllDatabasesAdmin permissions to run this command.
.alter
cluster
policy
query_weak_consistency
PolicyObject
.alter-merge
cluster
policy
query_weak_consistency
PolicyObject
Note
With .alter
any property that isn't specified will be set to its default. With .alter-merge
, only the properties that you specify will be modified while the rest remain unchanged.
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
PolicyObject | string |
✔️ | A serialized JSON policy object. For the policy properties, see the query weak consistency policy. |
JSON serialization of the updated query weak consistency policy object
alter
command:
.alter cluster policy query_weak_consistency ```{
"PercentageOfNodes": 10,
"MinimumNumberOfNodes": 2,
"MaximumNumberOfNodes": 20,
"SuperSlackerNumberOfNodesThreshold": -1,
"EnableMetadataPrefetch": false,
"MaximumLagAllowedInMinutes": 10,
"RefreshPeriodInSeconds": 300
}```
Output
PolicyName | EntityName | Policy | ChildEntities | EntityType |
---|---|---|---|---|
QueryWeakConsistencyPolicy | {"PercentageOfNodes": 10, "MinimumNumberOfNodes": 2, "MaximumNumberOfNodes": 20, "SuperSlackerNumberOfNodesThreshold": -1, "EnableMetadataPrefetch": false, "MaximumLagAllowedInMinutes": 10, "RefreshPeriodInSeconds": 300} | Cluster |
For demonstrating the alter-merge
, we'll assume the following policy is set prior to executing the command:
{
"PercentageOfNodes": 20,
"MinimumNumberOfNodes": 10,
"MaximumNumberOfNodes": 100,
"SuperSlackerNumberOfNodesThreshold": -1,
"EnableMetadataPrefetch": false,
"MaximumLagAllowedInMinutes": 5,
"RefreshPeriodInSeconds": 30
}
alter-merge
command:
.alter-merge cluster policy query_weak_consistency @'{"PercentageOfNodes": 30, "MaximumLagAllowedInMinutes": 15}'
Output
PolicyName | EntityName | Policy | ChildEntities | EntityType |
---|---|---|---|---|
QueryWeakConsistencyPolicy | {"PercentageOfNodes": 30, "MinimumNumberOfNodes": 10, "MaximumNumberOfNodes": 100, "SuperSlackerNumberOfNodesThreshold": -1, "EnableMetadataPrefetch": false, "MaximumLagAllowedInMinutes": 15, "RefreshPeriodInSeconds": 30} | Cluster |
As can be seen, only PercentageOfNodes
and MaximumLagAllowedInMinutes
were modified (whereas if the alter
command was used instead, the remaining properties would be also modified, and set to their defaults).