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.
The Azure Data Explorer web UI query editor offers various features to help you write Kusto Query Language (KQL) queries. Some of these features include built-in KQL Intellisense and autocomplete, inline documentation, and quick fix pop-ups. In this article, we'll highlight what you should know when writing KQL queries in the web UI.
The query editor has built-in KQL Intellisense that offers contextual suggestions for functions and operators, and autocomplete that completes your queries to save you time and effort.
To use KQL Intellisense and autocomplete:
Start typing a query in the query editor.
KQL Intellisense activates, presenting dropdown options for entities, operators, functions, and more. Move between these options using the arrow keys on your keyboard, and select one by pressing Enter or selecting the option with your mouse.
If you notice underlined keywords, hover over them to reveal errors or suggestions that triggered the highlighting.
The query editor provides inline access to documentation for KQL operators, functions, and management commands.
To view inline documentation:
Hover over the operator, function, or command in the Intellisense.
Select the right arrow icon to open an inline preview of the documentation.
Note
The preview remains active until you close it or end your session, even for other operators and functions.
If you'd like to open the full documentation in your browser, select view online.
The query editor provides suggestions and warnings as you write your queries. The quick fix feature can be used to adjust the query based on these suggestions and warnings.
To fix a query based on a suggestion or warning:
Hover over the term to view the suggestion or warning.
Select Quick fix to show the available quick fix options.
Select the desired quick fix option.
Tip
To customize the suggestions and warnings that you receive, see Customize settings in Azure Data Explorer web UI.
The quick fix feature can also be used to extract out a value into a variable:
Select the value to extract.
Select the light bulb icon or press Ctrl + . to open the quick fix options.
Select Extract value.
The quick fix feature can also be used to define an existing function inline before its use. Adding an inline function definition may be useful to improve readability and maintainability of your queries.
To show a function definition:
Write and select the function name.
Select the light bulb icon or press Ctrl + . to open the quick fix options.
To define the function inline, select Inline (Inline function) or Inline Recursive (Inline function).
The KQL tools in the toolbar help you quickly duplicate a query, open the command palette, or access documentation.
To use KQL tools:
In the toolbar, select KQL tools.
Choose from options like Duplicate query, Open command palette, or hover over Resources to access documentation links. This list includes resources such as the KQL to SQL cheat sheet, Keyboard shortcuts, and KQL quick reference documentation.