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
To get started with a Docker installation, follow the MindsDB installation
instructions using Docker .
2. Connect to MindsDB from a SQL Client
MindsDB Cloud MindsDB Cloud to Dbeaver Local to Dbeaver By default, on MindsDB Cloud the SQL Editor is already connected. Skip to step 3
By default, on MindsDB Cloud the SQL Editor is already connected. Skip to step 3
a. Create a new MySQL connection.
b. Configure it using the parameters below, as well as your username and password.
Host: `cloud.mindsdb.com`
Port: `3306`
Database: `mindsdb`
a. Create a new MySQL connection.
b. Configure it using the following parameters:
Host: `localhost`
Port: `47335`
Database: `mindsdb`
Username: `mindsdb`
Password: <leave it empty>
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 ;
If you already have a model in MLFlow, you can connect to your model.
MindsDB creates my model My model is in MLflow CREATE MODEL mindsdb . home_rentals_predictor
FROM example_data
( SELECT * FROM demo_data . home_rentals )
PREDICT rental_price;
CREATE MODEL mindsdb . home_rentals_predictor
FROM example_data
( SELECT * FROM demo_data . home_rentals )
PREDICT rental_price;
CREATE MODEL mindsdb . home_rentals_predictor
FROM example_data ( select * from demo_data . home_rentals )
PREDICT rental_price
USING url . predict = 'http://host.docker.internal:1234/invocations' ,
format = 'mlflow' ,
dtype_dict = { "number_of_rooms" : "categorical" , "number_of_bathrooms" : "categorical" , "sqft" : "integer" , "days_on_market" : "integer" ,
"initial_price" : "integer" , "location" : "categorical" , "neighborhood" : "categorical" };
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:
profiles.yml
schema.yml
predicted_rentals.sql
dbt_project.yml
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
Responses are generated using AI and may contain mistakes.