Set statement
The set statement is used to set a query option for the duration of the query.
Query options control how a query executes and returns results. They can be boolean flags, which are false by default, or have an integer value. A query may contain zero, one, or more set statements. Set statements affect only the tabular expression statements that trail them in the program order. Any two statements must be separated by a semicolon.
- Query options can also be set programmatically in the ClientRequestProperties object.
Note
Some request options that can be set in the ClientRequestProperties object aren't supported when set via a set statement. For more information, see ClientRequestProperties.
- Query options aren't formally a part of the Kusto language, and may be modified without being considered as a breaking language change.
Syntax
set OptionName [= OptionValue]
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| OptionName | string | ✓ | The name of the query option. |
| OptionValue | ✓ | The value of the query option. |
Example
set querytrace;
Events | take 100
This capability isn't supported in Azure Monitor.