MongoDB
Reads documents from a MongoDB collection, converting BSON to JSON.
Configuration
yaml
source:
kind: mongodb
connection_string: "mongodb://localhost:27017"
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 | |
batch_size_rows | Rows per batch |
Namespace: mongodb.{database}.{collection}
CLI
bash
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 |
CDC
MongoDB supports real-time Change Data Capture via change streams. Add cdc_enabled: true to the source config and configure a pipeline cdc: block.
See CDC Sources -- MongoDB for prerequisites, configuration, and resume behavior.
