Connect your MongoDB Database to Abacus.AI

Abacus.AI allows you to attach datasets to your project from your MongoDB Database.

To set up the MongoDB connector, Follow these steps:

  1. You should have a MongoDB instance running with the required data.
  2. You should have your MongoDB host, database, username, password and auth Database source for credentials.

Verify your MongoDB Info and credentials by running the following command in your terminal:

mongosh "mongodb://<username>:<password>@<host>/<db_name>?authSource=<auth_db>"

The above should connect you to your MongoDB instance. If you are able to connect, you can proceed to the next step.

  1. In the Abacus UI, select your profile in the top right

connector-10

And select Manage Connectors

connector-11

Then select Add New Connector, then MongoDB, and input your values, and Save.

Steps to create Dataset from MongoDB to Abacus.AI

  1. In the Abacus.AI UI, navigate to the Datasets view and click the "Connect a new Dataset" button.
  2. Select the "Import from External Service" option and choose your MongoDB connector from the options available under "Database Connectors".
  3. Enter the required information for your MongoDB instance and click "Add Dataset" button.
  4. You can choose the collection you want to fetch, under "object name" section
  5. You can also filter the columns you want to fetch using the "Columns" section
  6. You can also perform filter over using the "Query Arguments" section. eg. {"age":20} will fetch all the documents with age 20.
  7. Finally, click on "Add Dataset" button.

The above steps will create a dataset from your MongoDB instance shortly. You can now use this dataset to train models in Abacus.AI.