Abacus.AI allows you to attach datasets to your project from your MongoDB Database.
To set up the MongoDB connector, Follow these steps:
- You should have a MongoDB instance running with the required data.
- 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.
- In the Abacus UI, select your profile in the top right
And select Manage Connectors
Then select Add New Connector, then MongoDB, and input your values, and Save.
- In the Abacus.AI UI, navigate to the Datasets view and click the "Connect a new Dataset" button.
- Select the "Import from External Service" option and choose your MongoDB connector from the options available under "Database Connectors".
- Enter the required information for your MongoDB instance and click "Add Dataset" button.
- You can choose the collection you want to fetch, under "object name" section
- You can also filter the columns you want to fetch using the "Columns" section
- You can also perform filter over using the "Query Arguments" section.
eg. {"age":20} will fetch all the documents with age 20.
- 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.