Hi,
We are using Metabase Enterprise version and I’m trying to apply Impersonation Permissions on my PostgreSQL databases.
we want to provide multi-tenant data permission for our product. On our databases, we have a schema for each tenant and each schema has same and equal number of tables.
to execute impersonation, we’ve created a role on postgres for a particular schema, granted usage and select access on that schema, and set the search_path of that role to that same schema and public.
For example, this is how the search path for that role looks like
{search_path = tenant_schema, public}
Now, I was able to verify if the impersonation is working or not, by creating two seperate charts using two different schemas, and only the chart that is powered by the impersonated schema shows the data. That’s all good.
But when I try to build a schema agnostic chart, like
SELECT * FROM table1;
now, it throws an error saying not able to find “table1”. Why is this happening?
How can I build such charts so that I can provide true multi-tenant data permissions?