How to make a dynamically changing snippet

Hi, I was thinking of making a query snippet of certain country codes so we can categorize them effectively. Is it possible to use the snippet so that if I have the snippet in use in various queries and I update the source snippet it updates all the values to the queries using that snippet? This kind of change would be only rarely as we evaluate which countries belong to which categories.

The code snippet so far, but it can have dozen or more countries inside of it.
Country IN (“GB”,“FR”,“DE”)

This isn’t possible yet. Your snippets become plaintext the moment you add them to a query. After that, there’s no reference to the snippet. Redash just treats it like any other input. The team wants to improve this in the future but there’s no timeline for it yet. We’d certainly review a pull request :wink:

I think you can do this with the API, though. The API exposes the full query text and query tags. So you could tag queries that use a specific “snippet”. When you update the “snippet” , you can pull the query text for queries with that tag and regex replace the old snippet for the new one. I can write up an example if you’re interested.