Application level multi-tenancy in Retool

Hello,
I would like to implement application level multi-tenancy in Retool.
For that I have a single database with all the data of all the tenants in it, so if I want to query data of a single tenant, I have to specify a WHERE clause in the query. (E.G: WHERE "tenant"='foo)

Now of course I wouldn't want to modify each query every time a new tenant is added, so
is there any way to allow a user to get data from a single specific tenant based on its user properties?

Hi @andrea_bluelabs! You should be able to create a search for your database (or table) within Retool. Here's some docs on how to create a search for SQL. We recommend you setting this up to only query your database once (initial loading), and then creating a filter for your data in your table. Hope this helps! :slightly_smiling_face:

Hey @andrea_bluelabs ,

Did you get anywhere with creating a multi-tenancy app? I'd love to see a demo if you did.