Same dashboards for different databases

hi everyone,

i would like to know if there is a way to "connect" dashboards to different databases so i can visualize the same statistics for different data, without having to recreate everything.

anyone can help ?
have a great day

Hi @armandviolle
No, since each question is connected to a database.
You would have to use something like Serialization to create your "template", which you would then create as many times as you have databases:
https://www.metabase.com/learn/data-diet/analytics/serialization.html

1 Like

hi again @flamber,
i read the documentation and i'm not sure about a thing or two.

  1. Serialization is part of Metabase Entreprise so it is not a free feature ?
  2. i didn't quite get what it does ; is it a dump from the origin metabase environment (Database, dahboards, etc ...) to the target environment ? in other words, in the end, does the target environment has the exact same data as the origin environment (so i'd have to change the database in the query myself if I want it connected to another Database which has the same structure) ?

Hi @armandviolle, Serialization is an Enterprise feature.

The idea behind serialization is that you can dump all instance objects into yaml files, so you can modify these and even version them with git and deploy (load) these files in the same or other server/s

I hope this is clear, otherwise let me know
regards,
Luis

Hi @Luiggi,
thank you for your answer, it is very clear.
If i understand well, there is not the possibility of "connecting" the dashboard to another database ; i would have to change it directly on the query page for each query right ?
regards,
Armand

In Metabase questions are "tied" to a data source. So if you have 10 questions connected to a specific data source and you want to "switch" the data source (making the same 10 questions to another data source), you have to re-create manually those questions (or do it vía API calls or with the Enterprise serialization feature)

I hope you find this info useful :slight_smile:

Simple way is to change the connection string to point to the new database hostname and db name etc, under "Metabase admin" -> "Databases" setting and click "Resync database Schema now" and/or "Rescan Field values". Vola, no change anywhere else in your "Question" or "SQL Query" or in the "Dashboard".

The existing dashboards will start populating the new data for the newly configured database.