Variables allow values to be assigned to identifiers to shorten and simplify searches and queries.
The query syntax, with the
into keyword, can be used to assign a value to a variable:
select 'Roastery Web Frontend' into $application
Note that variables must have a
Once declared, a variable can be used in search and query expressions.
Application = $application
select count(*) from stream where Application = $application
Variables can also be created by assigning the property of an event to a variable, using the user interface.
Variables appear in the 'Variables' tool window. Clicking a variable in the 'Variables' window will insert the variable into the search box.
The lifetime of variables is the user's browser session. When the session ends the variables disappear. For this reason, variables cannot be used in any expressions that are saved, such as: saved queries, signals, dashboard queries, alert queries, and API key filters.
Updated 2 months ago