Overview
The MongoDB Synapse uses the MongoDB driver to synchronize data between MongoDB collections and Syncari entities. After completing this setup, Syncari will replicate your MongoDB schema to the Unified Data Model, allowing you to map MongoDB collections and fields to Syncari entities.
Prerequisites
- You need a MongoDB database to connect to. This guide includes steps for provisioning a MongoDB Atlas cluster if you don't already have one
- If your MongoDB deployment restricts access by IP address, you must allowlist Syncari's connection. Use the IPs from Allowlist IP
Steps for Setup
Part 1: MongoDB Atlas Setup
Complete this section if you don't already have a MongoDB database to connect to. If you're connecting an existing MongoDB deployment, skip to Configure the MongoDB Synapse in Syncari.
Create a MongoDB Atlas Account and Cluster
1. Go to the MongoDB Atlas registration page and create an account.
2. From your Atlas dashboard, click Create under Create a Cluster.
3. Select the cluster tier appropriate for your use case, here the Free cluster option is selected.
4. Choose a cloud Provider and Region.
5. Enter a Name for your cluster.
6. Leave Automate security setup and Preload sample dataset checked, then click Create Deployment.
Set Up Connection Security
After deployment, Atlas automatically adds your current IP address to the access list and creates a database user with Atlas Admin access for the project.
1. Copy the generated Username and Password using the Copy buttons, or click Download .env file to save both credentials at once.
2. Click Choose a connection method to proceed.
Retrieve the Connection String
1. On the Choose a connection method step, select Drivers and Client Libraries.
2. Choose any Language and Client Library.
3. Under Use this connection string in your application, toggle Show Password on to reveal the real password in place of the <db_password> placeholder.
4. Copy the connection string, then manually replace <db_username> with the username you copied or downloaded earlier. Only the password is filled in automatically by the Show Password toggle.
5. Click Done.
Configure Network Access
By default, Atlas only allows connections from the IP address you set up from. Syncari connects from its own servers, so you must add entries for Syncari's published IP allowlist to allow it to reach your cluster.
1. In the Atlas left navigation, go to Security > Database & Network Access.
2. Click IP Access List.
3. Click Add IP Address.
4. Enter each IP address from Syncari's IP allowlist. Add a separate entry for each address in the list.
5. Add a comment describing the entry (for example, "Syncari synapse access").
6. Leave the temporary entry toggle off so the entry does not expire.
7. Click Confirm.
8. Repeat for each remaining IP address in Syncari's allowlist.
Identify a Database and Collection
1. Click your cluster, then click Browse Collections.
2. Note the name of the Database you want to sync. If you loaded the sample dataset, an existing database name (for example, sample_mflix) is available to use for testing.
Part 2: Configure the MongoDB Synapse in Syncari
1. Log in to your Syncari account and go to Synapse Studio in the left navigation menu.
2. Locate MongoDB in the Synapse Library panel and drag it onto the canvas.
3. Configure the synapse by filling in the following details:
| Field | Value |
| Synapse Name | A descriptive name. Use only letters and numbers, beginning with a letter. Spaces, hyphens (-), and underscores (_) are allowed. |
| Connection String Override | The full connection string retrieved above. |
| Host | The cluster address portion of the connection string (for example, cluster0.xxxxx.mongodb.net). |
| Port | 27017 (default). |
| Database Name | The database identified above. |
| Authentication Database | admin (default). |
| Use SSL/TLS Connection | Optional |
| Validate SSL Certificates | Optional, based on your security requirements. |
| Authentication Method | User Password |
4. Click Authenticate from the bottom of the screen.
5. Then add the User Name and Password.
6. Click Authenticate.
7. Once Authenticated, Click Finish.
8. Click Make Synapse Active.