Changes to how you create & delete query variables

October 25th, 2022
Post Cover Image

To define a query variable, you used to have to write a word and wrap it in {{ }}. If you removed it from a query, we’d try to delete it for you, but it would sometimes lead to downstream problems in presentation links.

So we’re changing the user experience to make it more bulletproof and squash any bugs 🐛

Now you’ll need to explicitly create and delete query variables (please see our docs for more details on query variables).

There are two ways to create a query variable:

  1. Click the {} button

  2. Write the variable directly in SQL. You’ll see a yellow underline warning you it doesn’t exist. Hover over the query variable to see the warning and click Quick Fix..

To delete a query variable, go to its Settings → three-dot menu → Delete variable.

Plus, you’ll now see inline feedback in your SQL code in case you accidentally make a mistake in a query variable or any other Liquid statement 🕵️

We hope this update makes your query variable experience more robust and bug-free!

Ready for a modern SQL editor?