Add a comment in KQL
Learn how to add comments in Kusto Query Language.
Indicates user-provided text. Comments can be inserted on a separate line, nested at the end, or within a KQL query or command. The comment text isn’t evaluated.
Syntax
// comment
Remarks
Use the two slashes (//) to add comments. The following table lists the keyboard shortcuts that you can use to comment or uncomment text.
| Hot Key | Description |
|---|---|
Ctrl+K+C | Comment current line or selected lines. |
Ctrl+K+U | Uncomment current line or selected lines. |
Examples
The following example illustrates two styles of comments: a nested comment at the end of a line and a standalone comment on its own line. The query counts the number of events in the state of New York.
// Return the count of events in the New York state from the StormEvents table
StormEvents
| where State == "NEW YORK" // Filter the records where the State is "NEW YORK"
| count
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.