Dynamic Database

Hello, I'm starting to implement the metabase and I have a question.
I work with a postgres multi tenancy database, for each company a new separate database is created. My initial idea would be to create a panel and weigh the name of the base for execution of the SQL query by parameter, from what I could see it is not possible to pass the base as a parameter, would it be possible to pass the connection as a parameter?


Hi @FernandoP
That is currently not possible with the way Metabase is currently structured.

You would have to duplicate your questions and change the database for each.
Either with a third-party tool like https://github.com/vvaezian/metabase_api_python or using Serialization https://www.metabase.com/docs/latest/enterprise-guide/serialization.html

Though, it would be easier if you ETL your different databases into a single database, so you can do filtering to separate the data, or have Sandboxing https://www.metabase.com/docs/latest/enterprise-guide/data-sandboxes.html

Hi @flamber
I understood what you told me and unfortunately I can't do an ETL at the moment because I need the data in real time and I don't have the infrastructure to replicate the base at the moment. As for duplicating questions and panels, is there a "simpler" way to do this?
I ask because I checked the metabse database and the table relationships are very large so it makes it a very difficult process to be done manually

again thank you very much

@FernandoP The references I have provided are the only options. I don't think Metabase is the right tool for you.