We are using Retool to create a monitoring tool that uses a bunch of SQL queries to detect events that are very specific to our database and how clients use our system.
Our software runs in multiple separate instances, and so there is a page for each instance and the queries for each page use a different Resource.
The queries are the same on each page, but it means we have to duplicate the query and change the resource for each one. That is becoming unwieldly as now we have so many of the same query, each with a different Resource.
Can I pass the resource as a parameter so I can reuse the same query across Resources?
I found this thread which suggests it was a feature being considered.
Has that feature come to pass? Is there any other way of achieving it?
That works well. The page has gone down from 200+ queries to 18 and is far more lightweight and suitable for adding more functionality to. Thank you for your help.
FYI, in case it helps, as I need to pass the ID of the resource I had to create a Retool database to store the name, ID and a few other details about each instance (such as the logo file), and then I replaced the navigation item with a list item powered by the query to the Retool database. All the queries on the page are triggered when the list is changed.
For Enterprise accounts, there is also a Retool API that returns resources & their ids. For self hosted accounts, you could query your resources table in your Retool database.