Skip to content

How to Configure MongoDB as a Source Connector

May 2026

MongoDB source setup is clean when the connection string, target collection, and auth database details are correct before the first read.

Short Answer

Configure MongoDB as a source by setting source.kind to mongodb, then passing connection_string, database, and collection. The docs recommend loading the connection string from MONGODB_CONNECTION_STRING, which is especially helpful when the URI includes credentials, an auth database, or replica-set parameters.

For the first run, keep the target narrow: one database, one collection, and an optional JSON filter only if you need a smaller slice. That makes it easy to validate document shape, confirm that BSON-to-JSON conversion is sensible for downstream consumers, and verify the same connection can later support change-stream CDC if you move beyond batch reads.

Why Teams Struggle with This

MongoDB setups usually break on connection details hidden inside the URI. A hostname may be right while the auth database is wrong, or the connector may reach the server but point at a database and collection the user cannot read.

  • The connection_string should live in an environment variable rather than the config file.
  • The MongoDB user needs read access to the selected database and collection.
  • Network access to the MongoDB endpoint has to be available from the runner environment.
  • If you plan to enable CDC later, make sure the deployment can support change-stream prerequisites documented separately.

How Skippr Handles It

Skippr treats MongoDB configuration as a straightforward collection reader: URI, database, collection, and optional filter. That is enough to get a public resource article or internal extract moving without forcing a large source definition just to read one collection well.

The first healthy setup should produce a result you can inspect quickly. Skippr can authenticate with the given URI, read the selected collection, and preserve a namespace that clearly ties the records back to mongodb.{database}.{collection}.

  • Simple MongoDB source config with connection_string, database, and collection.
  • Credential handling through ${MONGODB_CONNECTION_STRING}.
  • Optional filter support for narrower first extracts.
  • A smooth transition from batch extraction into change-stream CDC when the source is ready.

What the First Useful Version Looks Like

Check the exact connection string the runtime receives, including any auth database, replica-set, or TLS parameters, before assuming a login issue is inside Skippr itself.

If you expect to expand into CDC later, confirm early that the deployment type and operational controls around MongoDB can support change streams cleanly.