TL;DR; Are there APIs available to translate MBQL to and from SQL, and if not, would implementing some scripts that do that be a stupid idea?
This is related to How does Metabase handle database changes?
We are currently using Metabase to expose some data to some analysts working in different teams throughout the organization, and are wondering how we can provide them with reliable, continuously tested questions and dashboards, and to have a way for developers to update those questions/dashboards programmatically.
Ideally those questions would be MBQL questions to allow the full range of features provided by metabase (I recall that native SQL questions don’t have all of the features that metabase questions have).
Our developers however write in SQL, and we use pgTap to test our database queries.
A while ago were toying with the idea of writing a library that could translate MBQL to and from SQL, so that we can store our questions in tested, version-controlled SQL files, and use the Metabase API to recreate them during our continuous deployment process.
I thought it was a cool idea and it’d like to work more on it, but I was wondering if there were some pitfalls and/or existing features that I am unaware of (granted that this exploration was done last year, so I am not up to date).