Skip to main content
Version: Next

MongoDB

The MongoDB output writes each Arrow row as a BSON document in a configured MongoDB collection. Column names become document field names, and scalar values and nulls are preserved.

Configuration

FieldTypeRequiredDescription
typestringyesFixed value "mongodb".
uristringyesMongoDB connection URI, including authentication/options when needed.
databasestringyesDestination database name.
collectionstringyesDestination collection name.

The output supports UTF-8 strings, signed and unsigned integers that fit BSON int64, floating-point values, booleans, binary values, and nulls. Nested Arrow values and codecs are not supported in this initial version.

Example

output:
type: "mongodb"
uri: "mongodb://localhost:27017"
database: "arkflow"
collection: "events"

The output connects and pings MongoDB before accepting writes. Each non-empty message batch is sent with one bulk insertion operation.