pql icon indicating copy to clipboard operation
pql copied to clipboard

Add "let" operator

Open abraithwaite opened this issue 2 years ago • 0 comments

The let operator allows users to assign variables to be used in queries. Example follows.

let n = 10;  // number
let place = "Dallas";  // string
let cutoff = ago(62d); // datetime 
Events 
| where timestamp > cutoff 
    and city == place 
| take n

Kusto docs:

https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/let-statement

abraithwaite avatar Feb 29 '24 16:02 abraithwaite