I developed a small cli tool, to manage your metabase instance with local files, that you can put under version control. I call it "mbs", short for MetabaseSync.
You can find it here: https://github.com/Administerium/mbs
How does it work? Very similar to git. I give you a (not very detailed) example:
- Create a folder, run "mbs init" and "mbs login"
- Run "mbs pull" and all your question get downloaded as json files to this folder
- Now you can edit this files. You can use the powerfull jinja2 template engine ( https://jinja.palletsprojects.com/en/3.1.x/templates/ ), to reuse sql code in multiple questions and many more things.
- Upload the file to metabase with "mbs push"
- Now fine-tune the visuals in the Metabase UI
- Now sync it back to your json file with "mbs merge my-json-file.json" and it will update the file with your customization. But it will keep your sql query with all the very cool jinja2 stuff
- Now put that folder under your version control system like git and track your changes.
A better and more detailed example is in the README: https://github.com/Administerium/mbs
This is still a beta, but for now it works fine with the things i do. If you find problem/bugs open a issue on github or even better: Make a pull request with your fix/feature
Have fun