I want to build a screen that once loaded will make a query to get raw data from my database and temporarily store it in a temporary table in Retool SQL DB. During the session, the user can now run SQL queries on this temporary table without making a new query request.
Is there a way to do this?
Hi @R_S_I_F,
What do you mean by
During the session, the user can now run SQL queries on this temporary table
You want both READ and WRITE actions to be made by user to that data?
If so, I'm not sure about the temporary table, however you can use a variable to replicate that data and read/make changes to that dataset.
There is a previous example here
Hope this helps!
No, I want to make one call to my database when the user enters the page (simple). Raw data will be returned without any grouping or filtering. Data will be automatically stored on a "temporary" table with a read option. With SQL queries to this temp database, the user can get whatever he needs without having to make a new request for each new request.
Ok, so I'm not able to help you with this.
Just out of curiosity, if the new temp table is ready only, why not just filtering the data you already have, based on user input? Not getting my head around why you would like to keep querying data that it is already available
because the "group by" on the table doesn't work properly...
So to get the most from the data as a user you need to use SQL group by and filters (where).
But because of speed and resource management, I don't want to request my database for each "filter"/Group by the user makes...
Cache the query result, and then use Query JSON with SQL against the (cached) result of the initial query.
How can i do so? How can I use SQL against the (cached result of the row data)?