MongoDB Atlas Integration with Edilitics
MongoDB Atlas is a cloud-based version of MongoDB, offering a fully managed service with scalability, high availability, and global reach. This makes it ideal for businesses seeking a reliable platform to host their MongoDB deployments. To learn more about MongoDB Atlas, visit the official MongoDB Atlas website.
Within the Edilitics platform, MongoDB Atlas can be used both as a source and destination for data, making it a versatile tool for data analysis workflows. This enables you to leverage MongoDB Atlas’ strengths for data storage and retrieval within your Edilitics environment.
This guide will show you how to set up MongoDB Atlas as a data source in Edilitics. By following these steps, you'll be able to leverage the power of MongoDB Atlas data for insightful analysis within Edilitics.
Before You Begin
Ensure you have the following:
-
Replication configured for MongoDB Atlas using OpLog or Change Streams.
-
Edilitics has read permissions to the MongoDB Atlas databases.
-
Edilitics' IP addresses are whitelisted in your MongoDB Atlas environment:
-
34.93.42.224
-
34.131.133.218
-
-
Access to your MongoDB Atlas account credentials.
Setting Up MongoDB Atlas for Edilitics Integration
Step 1: Set Up Permissions
Assigning granular read permissions enhances data access control. Follow one of these methods:
-
Create a Custom Role
-
Log in to the MongoDB Atlas console.
-
Navigate to Security > Database Access.
- Select Custom Roles > Add New Custom Role.
-
Name the role and define required actions (e.g., Change Streams or OpLog) for intended databases, including the "local" database.
-
Optionally, include roles like
readAnyDatabase
orlistDatabases
for broader access. -
Click Add Custom Role to save.
-
-
Create a Database User
-
Log in to the MongoDB Atlas console.
-
Navigate to Security > Database Access.
-
Click + ADD NEW DATABASE USER.
- Choose "Password" authentication, set a username, and assign privileges.
- Assign the custom role created in the previous step.
-
Configure specific privileges:
-
Assign the "read" role to the "local" database.
-
Grant
readAnyDatabase
to the "admin" database (for all database access) or assign "read" privileges to specific databases. -
Include
listDatabases
privileges for the "admin" database.
-
-
Cick Add User to finalize.
-
Note: Allow up to five minutes for permission changes to propagate.
Step 2: Whitelist Edilitics IP Addresses
To allow Edilitics to connect to MongoDB Atlas, whitelist IP addresses:
-
Log in to the MongoDB Atlas console.
-
Navigate to Security > Network Access.
-
Click + ADD IP ADDRESS under IP Access List.
- Enter Edilitics IP addresses:
-
34.93.42.224
-
34.131.133.218
-
Alternatively, use
0.0.0.0/0
to allow all IPs temporarily (not recommended for production).
-
- Click Confirm to save changes.
Step 3: Retrieve Database Settings
Gather the following database settings:
-
Log in to the MongoDB Atlas console.
-
Select the relevant project containing the databases you want to integrate.
-
On the Overview page, locate the Deployments >> Database section and click CONNECT.
-
In the Connect to Cluster Name pop-up window:
-
Select Developer Tools under Select Client Category.
-
Under Choose a Tool, select Compass (GUI).
-
Check the box for "I have Installed Compass" (even if not installed; it's not required for Edilitics configuration).
-
-
Choose the appropriate Compass version based on your MongoDB version:
-
Version 1.12 or later for MongoDB versions 3.6 and above.
-
Version 1.11 or earlier for older versions.
-
-
Copy the connection string displayed in the code block.
-
Replace
<username>
and<password>
with the credentials you created for the Edilitics user in Step 1.
Connecting MongoDB Atlas to Edilitics
Step 4: Add the MongoDB Atlas Connector in Edilitics
-
Navigate to the Integrations module in Edilitics.
-
Click New Integration.
- Choose the MongoDB Atlas connector from the list or use the search bar.
Step 5: Configure the MongoDB Atlas Connection
Enter the following details on the setup screen:
Field Name | Details |
---|---|
Integration Title | Give your integration a unique name to easily identify it within Edilitics. |
Integration Description | Briefly describe the data you're integrating. |
Database Name | The specific database name in your MongoDB Atlas instance. |
Host | The hostname or IP address of your MongoDB Atlas server. |
Port | The port number used by your MongoDB Atlas server (default is 27017 ). |
Username | A user account with permissions to access and read data. |
Password | The corresponding password for the user account. |
Alternatively, use a connection string:
The mongodb+srv://
Connection String
mongodb+srv://<username>:<password>@<cluster-address>/<database_name>?options
Include options like:
-
retryWrites
: Enables retryable writes. -
w
: Specifies the write concern. -
authSource
: Specifies the database to authenticate against.
Step 6: Test the Connection
Once you've entered your credentials, click the Test Connection button. Edilitics will attempt to connect to your MongoDB Atlas database. You'll see a confirmation message if the connection is successful. Otherwise, Edilitics will provide troubleshooting details.
Step 7: Verify & Finalize Integration
Upon successful database connection, you can:
-
Preview (Optional): Confirm accuracy by retrieving a sample of tables and data.
-
Update (Optional): Modify connection details if the preview deviates from expectations.
-
Save: Finalize by encrypting and storing connection details within Edilitics.
Need Assistance? Edilitics Support is Here for You!