MongoDB
Learn how to use Artie to replicate data from MongoDB via change streams.
MongoDB server must be in a replica set. If your pipeline only has a standalone
server, you can create a replica set with one member.
Need help? Check out this guide.
Required settings
- Connection string
- Service account
Connection string
- Go to Atlas UI
- Find your pipeline and click “Connect”
We support both MongoDB SRV format or standard connection string.
Retrieve connection string from Atlas
Retrieve connection string from Atlas
Service account
You can create a service account through the Atlas UI or by running a script.
Option #1 - Atlas UI
Option #1 - Atlas UI
- Click on
Database Access
on the left - Click on
Add New Database User
- Under
Database User Privileges
, openBuilt-in Role
and SelectOnly read any database
Option #2 - Service account script
Option #2 - Service account script
Advanced
Enabling full document before change
Enabling full document before change
If you are replicating a MongoDB collection into a partitioned table downstream, you will want to consider enabling this so that the full document before change is available for deletes.
This is because we will need the previous row to grab the partitioned field(s) in order to select the right partition downstream.
To enable this, you’ll want to run the following commands: