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
Create a new workload group, or alters an existing workload group.
You must have Cluster AllDatabasesAdmin permissions to run this command.
.create-or-alter
workload_group
WorkloadGroupName SerializedPolicyObject
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
WorkloadGroupName | string |
✔️ | Name of the workload group. Can be specified with bracket notation ['WorkLoadGroupName']. |
SerializedPolicyObject | string |
✔️ | JSON representation of the policy. * |
*
The following policies apply to workload groups:
The command returns one row showing the details of the workload group.
Following is the schema of the output returned:
Name | Type | Description |
---|---|---|
WorkloadGroupName | string |
Name of the workload group. |
WorkloadGroup | string |
JSON representation of the workload group. |
Create MyWorkloadGroup workload group with a full definition of its request limits policy:
.create-or-alter workload_group MyWorkloadGroup ```
{
"RequestLimitsPolicy": {
"DataScope": {
"IsRelaxable": true,
"Value": "HotCache"
},
"MaxMemoryPerQueryPerNode": {
"IsRelaxable": false,
"Value": 6442450944
},
"MaxMemoryPerIterator": {
"IsRelaxable": false,
"Value": 5368709120
},
"MaxFanoutThreadsPercentage": {
"IsRelaxable": true,
"Value": 100
},
"MaxFanoutNodesPercentage": {
"IsRelaxable": true,
"Value": 100
},
"MaxResultRecords": {
"IsRelaxable": true,
"Value": 500000
},
"MaxResultBytes": {
"IsRelaxable": true,
"Value": 67108864
},
"MaxExecutionTime": {
"IsRelaxable": true,
"Value": "00:04:00"
},
"QueryResultsCacheMaxAge": {
"IsRelaxable": true,
"Value": "00:05:00"
}
}
} ```
Output
WorkloadGroupName | WorkloadGroup |
---|---|
MyWorkloadGroup | {"RequestLimitsPolicy":{"DataScope":{"IsRelaxable":true,"Value":"HotCache"},"MaxMemoryPerQueryPerNode":{"IsRelaxable":false,"Value":6442450944},"MaxMemoryPerIterator":{"IsRelaxable":false,"Value":5368709120},"MaxFanoutThreadsPercentage":{"IsRelaxable":true,"Value":100},"MaxFanoutNodesPercentage":{"IsRelaxable":true,"Value":100},"MaxResultRecords":{"IsRelaxable":true,"Value":500000},"MaxResultBytes":{"IsRelaxable":true,"Value":67108864},"MaxExecutionTime":{"IsRelaxable":true,"Value":"00:04:00"}},"RequestRateLimitPolicies":[{"IsEnabled":true,"Scope":"WorkloadGroup","LimitKind":"ConcurrentRequests","Properties":{"MaxConcurrentRequests":20}}]} |
Create My Workload Group workload group with a full definition of its request limits policy and request rate limits policies:
.create-or-alter workload_group ['My Workload Group'] ```
{
"RequestLimitsPolicy": {
"DataScope": {
"IsRelaxable": true,
"Value": "All"
},
"MaxMemoryPerQueryPerNode": {
"IsRelaxable": true,
"Value": 6442450944
},
"MaxMemoryPerIterator": {
"IsRelaxable": true,
"Value": 5368709120
},
"MaxFanoutThreadsPercentage": {
"IsRelaxable": true,
"Value": 100
},
"MaxFanoutNodesPercentage": {
"IsRelaxable": true,
"Value": 100
},
"MaxResultRecords": {
"IsRelaxable": true,
"Value": 500000
},
"MaxResultBytes": {
"IsRelaxable": true,
"Value": 67108864
},
"MaxExecutionTime": {
"IsRelaxable": true,
"Value": "00:04:00"
},
"QueryResultsCacheMaxAge": {
"IsRelaxable": true,
"Value": "00:05:00"
}
},
"RequestRateLimitPolicies": [
{
"IsEnabled": true,
"Scope": "WorkloadGroup",
"LimitKind": "ConcurrentRequests",
"Properties": {
"MaxConcurrentRequests": 100
}
},
{
"IsEnabled": true,
"Scope": "Principal",
"LimitKind": "ConcurrentRequests",
"Properties": {
"MaxConcurrentRequests": 25
}
}
]
} ```
Output
WorkloadGroupName | WorkloadGroup |
---|---|
My Workload Group | {"RequestLimitsPolicy":{"DataScope":{"IsRelaxable":true,"Value":"All"},"MaxMemoryPerQueryPerNode":{"IsRelaxable":true,"Value":6442450944},"MaxMemoryPerIterator":{"IsRelaxable":true,"Value":5368709120},"MaxFanoutThreadsPercentage":{"IsRelaxable":true,"Value":100},"MaxFanoutNodesPercentage":{"IsRelaxable":true,"Value":100},"MaxResultRecords":{"IsRelaxable":true,"Value":500000},"MaxResultBytes":{"IsRelaxable":true,"Value":67108864},"MaxExecutionTime":{"IsRelaxable":true,"Value":"00:04:00"}},"RequestRateLimitPolicies":[{"IsEnabled":true,"Scope":"WorkloadGroup","LimitKind":"ConcurrentRequests","Properties":{"MaxConcurrentRequests":100}},{"IsEnabled":true,"Scope":"Principal","LimitKind":"ConcurrentRequests","Properties":{"MaxConcurrentRequests":25}}]} |