How to dump native query to text format for version control?

We have a big instance of Metabase for data analytics of multiple projects. And, the technical assets are getting complicated, with hundreds of queries (a.k.a. questions of native SQL queries) and still increasing.

We want to have a systematic way to dump the native SQL query into a text file, e.g., an SQL file, so that we can check it into a source code repository for version control.

Our Question:

Do we already have this built-in function in Metabase to dump or export the queries to text files?

Otherwise, we are thinking about doing a query to the backend database of Metabase, e.g., PostgreSQL. So, this is the metadata of Metabase itself, not the data sources referring to for analytics. And we wonder which tables to select from.

We are new to this part of Metabase, and we highly appreciate hints and suggestions.

Hi, serialization feature is exactly for this: Serialization

1 Like