Skip to main content

Overview

MongoDB is a document-oriented NoSQL database that provides high performance, high availability, and easy scalability. Datazone provides native integration with MongoDB to read data directly from your collections.

Connection Parameters

Set on the source when you create it. Names match the API and CLI payload.
string
required
Name — a unique identifier for your MongoDB source.
string
required
Host — hostname or IP address of your MongoDB server. You may also supply a full connection string beginning with mongodb:// or mongodb+srv://, in which case it is used verbatim and port, user, and password are ignored. Use this form for replica sets, Atlas clusters, and any connection needing extra options.
string
required
Port — port the MongoDB server listens on. Typically 27017.
string
required
Database Name — the database holding the collections you want to extract.
string
required
User — username with read permission on the database.
string
required
Password — password for the specified user. Stored encrypted.

Extract Parameters

Set per extract, in source_parameters. See Shared Extract Parameters for mode, replication_key, and schema_mapping.
string
required
Collection Name — the collection to extract, within the source’s database_name.
integer
default:"10000"
Documents fetched and written per batch. Lower than the relational default because documents are typically wider than rows.
integer
default:"50"
Number of documents sampled to infer the schema. Raise it when a collection is heterogeneous and fields present in only a few documents are being missed.
boolean
default:"true"
Cast values to string rather than inferring narrower types. Keeps the schema stable across documents whose field types disagree.
string
default:"*"
Fields to read, as a comma-separated list.
string
Row filter applied to the documents read.

Required Permissions

The MongoDB user account needs the following permissions:
  • find - For reading documents from collections
  • listCollections - For listing available collections
  • listIndexes - For accessing collection indexes
  • read - For reading data from the database

Limitations

Be aware of the following limitations when working with MongoDB sources:
  • Complex MongoDB data types may be converted to standard formats
  • Individual document size limits apply based on your MongoDB configuration
  • The schema is inferred from a sample of documents, not from the whole collection

Next Steps

After configuring your MongoDB source:
  1. Create extracts to specify which collections to ingest
  2. Configure scheduling for recurring extracts
  3. Integrate the source into your data pipelines
For more information about working with extracts and pipelines, refer to their respective documentation sections.