MindsDB can be integrated with the most popular databases, as well as with the DBT and MLflow workflows.

To try out MindsDB right away without bringing in your own data or models, follow our Quickstart guide.

1. Create a MindsDB Cloud Account or Install MindsDB Locally

2. Connect to MindsDB from a SQL Client

If you do not have a preferred SQL client yet, we recommend using the MindsDB SQL Editor or DBeaver Community Edition. Follow this guide to set up your MindsDB SQL Editor. And here, you’ll find how to connect to MindsDB from DBeaver.

By default, on MindsDB Cloud the SQL Editor is already connected. Skip to step 3

3. Connect your Data to MindsDB Using CREATE DATABASE

CREATE DATABASE example_data
WITH ENGINE = "postgres",
PARAMETERS = {
  "user": "demo_user",
  "password": "demo_password",
  "host": "3.220.66.106",
  "port": "5432",
  "database": "demo"
};

4. Preview the Available Data Using SELECT

SELECT *
FROM example_data.demo_data.home_rentals
LIMIT 10;

5. Create a Model Using CREATE MODEL

If you already have a model in MLFlow, you can connect to your model.

CREATE MODEL mindsdb.home_rentals_predictor
FROM example_data
    (SELECT * FROM demo_data.home_rentals)
PREDICT rental_price;

6. Make Predictions Using SELECT

SELECT rental_price
FROM mindsdb.home_rentals_predictor
WHERE number_of_bathrooms = 2
AND sqft = 1000;

On execution, we get:

+--------------+
| rental_price |
+--------------+
| 1130         |
+--------------+

7. Integrate your Predictions into the DBT Workflow

To do so, you need to make the following changes:

mindsdb:
    type: mysql
    host: mysql.mindsdb.com
    user: mindsdb.user@example.com
    password: mindsdbpassword
    port: 3306
    dbname: mindsdb
    schema: example_data
    threads: 1
    keepalives_idle: 0 # default 0, indicating the system default
    connect_timeout: 10 # default 10 seconds