Integration with MongoDB
Requirements & installation
will require more space. We recommend to start with 100GB of disk space. We recommend to have at least 4 cores / vCPU and 16GB of RAM.
Constraint on the data structure
Sarus is a powerful tool for analytics and AI. Currently, it supports only datasets with schema. For data stored in MongoDB as collections, it means that all documents in one collection must have the same schema.
Sarus infers this schema from the first document in the collection. It will recognize the data types and generate synthetic data accordingly.
Connecting Sarus to MongoDB using the Atlas SQL interface and the JDBC driver
Sarus connects to MongoDB through the Atlas SQL Interface and the JDBC driver. You first need to enable it on your instance. Check the MongoDB documentation to learn more about the Atlas SQL Interface
Connect to Your Federated Database Instance
Navigate to your federated database instance. If it isn’t already displayed, select Data Federation from the left navigation panel.
Click Connect to open the federated database instance connection modal.
Select Connect using the Atlas SQL Interface.
Select JDBC Driver.
Copy your connection information. Atlas Data Federation provides a connection string to connect to your federated database instance. You’ll need this in a later step.
Connect from Sarus.
Once you’re logged in to Sarus UI, you need to create a DataConnection object that will allow Sarus to query MongoDB.
Add a new DataConnection. In Sarus, click DataConnection, create and click on the MongoDB logo.
In the form, enter the following information:
name: given to the dataConnection to be created.
username: the MongoDB user to connect with.
password: the MongoDB user’s password to connect to MongoDB.
server: the server name from the URL exposing the MongoDB Atlas SQL interface. This is the part of connection string you got from step A.5, which is between the prefix ‘jdbc:mongodb://’ and the name of your virtual database, without any ‘/’ symbols.
database: the name of your virtual database.
When you validate the form, a test is performed to check that Sarus can actually access the MongoDB collection.
You’re now ready to go!
You can create new datasets in Sarus and make your MongoDB accessible in a privacy-preserving way through Sarus.