Integrations, or external databases, provide data to be used for making forecasts. Here, we use the databases.insertOne() method to connect the integrations to Mongo.
db.databases.insertOne()
MethodMindsDB enables adding databases to your Mongo instance using the
db.databases.insertOne()
method.
Our MindsDB Mongo API supports creating a connection by passing the database credentials.
Here is the syntax:
On execution, we get:
Where:
Name | Description |
---|---|
name | Identifier for the data source to be created. |
engine | Database engine to be selected. |
connection_args | {"key":"value"} object storing the connection parameters such as port, host, database. |
Here is an example of how to connect to the local MongoDB.
On execution, we get:
You can list all the linked databases using the following command:
On execution, we get: