This repository contains tools to export and import Metabase questions, dashboards, and queries using the Metabase API. The purpose of this repository is to provide an easy way to manage Metabase content through version control and automation.
-
Clone the repository:
git clone https://github.com/githubnext/workspace-blank.git cd workspace-blank
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the export script:
python scripts/export_metabase.py
This will export the existing queries, questions, and dashboards from Metabase and save them to a file.
-
Clone the repository:
git clone https://github.com/githubnext/workspace-blank.git cd workspace-blank
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the import script:
python scripts/import_metabase.py
This will read the data from a file and import the queries, questions, and dashboards into Metabase.
To automate the import and export process using GitHub Actions, follow these steps:
-
Create a new file in the
.github/workflows
directory calledmetabase-import-export.yml
. -
Define the necessary steps to authenticate with the Metabase API, export existing queries, questions, and dashboards, and import them into Metabase.
-
Commit and push the changes to your repository. GitHub Actions will automatically run the workflow based on the defined triggers.