Skip to main content

MongoDB

The Conduit Platform by default supports MongoDB as a source and a destination.

The MongoDB destination can connect to and produce records to a collection.

Required Configurations​

NameDescriptionRequiredDefault
dbThe name of a database the connector must work with.Yes
collectionThe name of a collection the connector must write to.Yes

Looking for something else? See advanced configurations.

Upsert Behavior​

The destination connector takes an sdk.Record and parses it into a valid MongoDB query and is designed to handle different payloads and keys. Because of this, each record is individually parsed and upserted.

Collection Name​

If a record contains a mongo.collection property in its metadata it will be written in that collection, otherwise it will fall back to use the collection configured in the connector. Thus, a Destination can support multiple collections in the same connector, as long as the user has proper access to those collections.

Key Handling​

The connector uses all keys from an sdk.Record when updating and deleting documents.

If the _id field can be converted to a bson.ObjectID, the connector converts it, otherwise, it uses it as it is.

Advanced Configurations​

NameDescriptionRequiredDefault
uriThe connection string. The URI can contain host names, IPv4/IPv6 literals, or an SRV record. Example: mongodb://localhost:27017No
auth.usernameThe username.No
auth.passwordThe user's password.No
auth.dbThe name of a database that contains the user's authentication data.No
auth.mechamismThe authentication mechanism. The available values are SCRAM-SHA-256, SCRAM-SHA-1, MONGODB-CR, MONGODB-AWS, or MONGODB-X509. This will depend on your MongoDB server version.No
auth.tls.caFileThe path to either a single or a bundle of certificate authorities to trust when making a TLS connection.No
auth.tls.certificateKeyFileThe path to the client certificate file or the client private key file.No