MongoDB
Install
See the Install guide for the full setup, including Windows PowerShell.
curl -fsSL https://install.skippr.io/install.sh | shClick to copyReads documents from a MongoDB collection, converting BSON to JSON.
Configuration
source:
kind: mongodb
connection_string: ${MONGODB_CONNECTION_STRING}
database: mydb
collection: events| Field | Default | Description |
|---|---|---|
connection_string | (required) | MongoDB connection URI |
database | (required) | Database name |
collection | (required) | Collection name |
filter | Optional JSON filter document |
Namespace: mongodb.{database}.{collection}
CLI
skippr connect source mongodb \
--connection-string 'mongodb://user:pass@host:27017' \
--database mydb \
--collection users| Flag | Description |
|---|---|
--connection-string | MongoDB connection URI |
--database | Database name |
--collection | Collection name |
--filter | Optional 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:
source:
kind: mongodb
connection_string: ${MONGODB_CONNECTION_STRING}Set the env var before running skippr:
macOS / Linux
export MONGODB_CONNECTION_STRING="mongodb://user:pass@host:27017"Windows PowerShell
$env:MONGODB_CONNECTION_STRING = "mongodb://user:pass@host:27017"Windows Command Prompt
set MONGODB_CONNECTION_STRING=mongodb://user:pass@host:27017Permissions 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
| Symptom | Fix |
|---|---|
| authentication failed | Verify the MongoDB connection string, credentials, and authentication database. |
| no documents returned | Check 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
- Pair this source with a destination from Destination Connectors.
- For CDC setup and restart behavior, see CDC Sources and CDC Operations.
Install
See the Install guide for the full setup, including Windows PowerShell.
curl -fsSL https://install.skippr.io/install.sh | shClick to copy