Query Variables

Make your queries dynamic and link together objects.

Query variables allow you to attach variables to a value, so you can use them multiple times, or reuse the same query but change the value of the query variables.

To use query variable in your SQL queries, simply wrap the name of your variable in double curly braces in the SQL Client, like {{id}}. You will then be able to attach a value to your variable in the right sidebar.

select *
from customers
where id = {{id}}

Configuring a Query Variable

Once you add a query variable name by surrounding it with curly braces, it will appear in the right sidebar as an empty variable. To attach a value to it, type in the value of the query variable under the variable name.

Supported Variable Types:

  • String

  • Number

  • Date

  • Boolean

No further configuration is required, no matter what type of variables you have, Arctype detects whether your variable is a String, Number, etc