Documentation
DocumentationDiscussions
Documentation

Variables

Variables allow values to be assigned to identifiers to shorten and simplify searches and queries.

Assigning Variables

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 $ prefix.

Once declared, a variable can be used in search and query expressions.

Application = $application

or

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.

1290

Variable assignment

Variables appear in the 'Variables' tool window. Clicking a variable in the 'Variables' window will insert the variable into the search box.

Restrictions

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.