We are facing two problems with the current Metabase architecture:
We need to put cards/questions in Git so that we can track changes. Yes, Metbase provides a history for cards (but not for dashboards), but it’s much less flexible and methodical that having these in Git. See https://github.com/metabase/metabase/issues/6485.
As we create more dashboards and more questions we find that we need to copy and paste a lot of boilerplate. Part of the problem can be solved using views in the db, but there’s still a lot of code that repeats when a dashboard has 4-5 drop downs and these need to be replicated in each question. touches on this.
Both these issues can be solved by having the cards reside in files rather than in the db. We can then generate the files using some kind of templating engine. There’s a similar idea in https://github.com/metabase/metabase/issues/5579. The advantage of using a file is that we can all use our favorite templating language or use a standard language and its full ecosystem.
In theory, we can implement much of this using the Metabase API: https://github.com/metabase/metabase/blob/master/docs/api-documentation.md
To insert and update cards and dashboards.
Indeed, when I look at two cards that are in the same dashboard, they are different in ways that are consistent with the approach that we’re contemplating. We could write simple scripts to maintain all the cards in a dashboard and generate new ones based on our existing ones.
On the other hand, we’d rather use a supported approach where we don’t need to maintain a custom solution.
Are other people considering the same set of issues? Is there an official plan on providing a templating soltuion? I didn’t see anything in the Github issues.