Mongo DB
Use Activations to sync data to a MongoDB table from any source we support.
Getting Started
MongoDB is a popular NoSQL database known for its flexibility and scalability, using a document-oriented data model that stores data in JSON-like structures called BSON. With Activations, you can sync data into MongoDB from any source we support.
To connect to MongoDB, Activations needs to know the Connection String for your instance and the database you want to connect to.
For a Local MongoDB Installation
Identify Your MongoDB Host and Port: By default, MongoDB runs on port
27017.Construct the Connection String: The basic format of the connection string for a MongoDB server is:
mongodb://user:pass@hostname:port/?retryWrites=true&w=majority
For MongoDB Atlas (Cloud Hosted)
- Log In to Your MongoDB Atlas Dashboard: Access your cluster in the MongoDB Atlas dashboard.
- Navigate to the Connect Section: Click on the "Connect" button associated with the cluster from which you want to retrieve the connection string.
- Choose Your Connection Method: Select "Connect your application". This option provides you with the connection string.
- Copy the Connection String: You will see a connection string provided by Atlas. Replace
<password>with your database user's password, and adjust other parameters as necessary.
Now you're ready to set up your first sync to MongoDB!
Sync Identifier
Activations is expecting a 24 character hex string as the source value for the identifier field in MongoDB syncs. During the sync Activations will cast this value to ObjectID format, if it is a type other than a hex Activations will reject the record. This is intended to ensure uniformity in the _id field across the documents in your table.
Table schemas
Because MongoDB tables have flexible schemas, Activations treats every field you map from your source as a "custom field". Other than the key fields discussed above, Activations won't know about your table's schema. Instead, you'll use Activations' Field Mapping feature to map fields from your source to your MongoDB table by explicitly specifying the destination table field name.
Need help connecting to MongoDB?
You can reach out to our support team.