Skip to content

MongoDB

Install

See the Install guide for the full setup, including Windows PowerShell.

curl -fsSL https://install.skippr.io/install.sh | shClick to copy

Reads documents from a MongoDB collection, converting BSON to JSON.

Configuration

yaml
source:
  kind: mongodb
  connection_string: ${MONGODB_CONNECTION_STRING}
  database: mydb
  collection: events
FieldDefaultDescription
connection_string(required)MongoDB connection URI
database(required)Database name
collection(required)Collection name
filterOptional JSON filter document

Namespace: mongodb.{database}.{collection}

CLI

bash
skippr connect source mongodb \
  --connection-string 'mongodb://user:pass@host:27017' \
  --database mydb \
  --collection users
FlagDescription
--connection-stringMongoDB connection URI
--databaseDatabase name
--collectionCollection name
--filterOptional JSON filter document

Authentication

Use a MongoDB connection string. For security best practices, we strongly advise against storing the connection string in skippr.yaml. Use environment variable interpolation instead: replace the connection_string value with your own ${ENV_VAR} reference.

The relevant part of skippr.yaml looks like this:

yaml
source:
  kind: mongodb
  connection_string: ${MONGODB_CONNECTION_STRING}

Set the env var before running skippr:

macOS / Linux

bash
export MONGODB_CONNECTION_STRING="mongodb://user:pass@host:27017"

Windows PowerShell

powershell
$env:MONGODB_CONNECTION_STRING = "mongodb://user:pass@host:27017"

Windows Command Prompt

cmd
set MONGODB_CONNECTION_STRING=mongodb://user:pass@host:27017

Permissions or Network Requirements

The MongoDB user needs read access to the selected database and collection, and the machine running skippr must be able to reach the MongoDB endpoint. For CDC-specific change-stream requirements, see CDC Sources -- MongoDB.

Troubleshooting

SymptomFix
authentication failedVerify the MongoDB connection string, credentials, and authentication database.
no documents returnedCheck the selected database, collection, and optional filter document.

CDC Support

MongoDB supports real-time Change Data Capture via change streams. When paired with a supported warehouse destination, Skippr reconciles those mutations to exactly-once final state.

See CDC Sources -- MongoDB for prerequisites, configuration, and resume behavior.

Next steps

Install

See the Install guide for the full setup, including Windows PowerShell.

curl -fsSL https://install.skippr.io/install.sh | shClick to copy