MindsDB and Metabase
Metabase is open-source software that facilitates data analysis. It lets you visualize your data easily and intuitively. Now that MindsDB supports the MySQL binary protocol, you can connect it to Metabase and see the forecasts by creating and training the models.
For more information, visit Metabase.
Setup
MindsDB
Install MindsDB locally via Docker or Docker Desktop.
Metabase
Now, let’s set up the Metabase by following one of the approaches presented on the Metabase Open Source Edition page.
Here, we use the .jar approach for Metabase.
How to Connect
Follow the steps below to connect your MindsDB to Metabase.
- Open your Metabase and navigate to the Admin settings by clicking the cog in the bottom left corner.
- Once there, click on Databases in the top navigation bar.
- Click on Add database in the top right corner.
- Fill in the form using the following data:
- Click on Save.
Now you’re connected!
Example
Now that the connection between MindsDB and Metabase is established, let’s do some examples.
Most of the SQL statements that you usually run in your MindsDB SQL Editor can be run in Metabase as well. Let’s start with something easy.
On your Metabase’s home page, click on New > SQL query in the top right corner and then, select your MindsDB database.
Let’s execute the following command in the editor.
On execution, we get:
Please note that creating a
database connection using
the CREATE DATABASE
statement fails because of the curly braces ({}
) being
used by JDBC as the escape sequences.
On execution, we get:
You can overcome this issue using the MindsDB SQL Editor to create a database.
Now, getting back to the Metabase, let’s run some queries on the database created with the help of the MindsDB SQL Editor.
On execution, we get:
What’s Next?
Now that you are all set, we recommend you check out our Tutorials and Community Tutorials sections, where you’ll find various examples of regression, classification, and time series predictions with MindsDB.
To learn more about MindsDB itself, follow the guide on MindsDB database structure. Also, don’t miss out on the remaining pages from the SQL API section, as they explain a common SQL syntax with examples.
Have fun!