mongodb
This component is experimental and therefore subject to change or removal outside of major version releases.
Inserts items into a MongoDB collection.
Introduced in version 1.0.0.
- Common
- Advanced
# Common config fields, showing default values
output:
label: ""
mongodb:
url: mongodb://localhost:27017 # No default (required)
database: "" # No default (required)
username: ""
password: ""
collection: "" # No default (required)
operation: update-one
write_concern:
w: ""
j: false
w_timeout: ""
document_map: ""
filter_map: ""
hint_map: ""
upsert: false
max_in_flight: 64
batching:
count: 0
byte_size: 0
period: ""
jitter: 0
check: ""
# All config fields, showing default values
output:
label: ""
mongodb:
url: mongodb://localhost:27017 # No default (required)
database: "" # No default (required)
username: ""
password: ""
collection: "" # No default (required)
operation: update-one
write_concern:
w: ""
j: false
w_timeout: ""
document_map: ""
filter_map: ""
hint_map: ""
upsert: false
max_in_flight: 64
batching:
count: 0
byte_size: 0
period: ""
jitter: 0
check: ""
processors: [] # No default (optional)
Performance
This output benefits from sending multiple messages in flight in parallel for improved performance. You can tune the max number of in flight messages (or message batches) with the field max_in_flight
.
This output benefits from sending messages as a batch for improved performance. Batches can be formed at both the input and output level. You can find out more in this doc.
Fields
url
The URL of the target MongoDB server.
Type: string
# Examples
url: mongodb://localhost:27017
database
The name of the target MongoDB database.
Type: string
username
The username to connect to the database.
Type: string
Default: ""
password
The password to connect to the database.
This field contains sensitive information that usually shouldn't be added to a config directly, read our secrets page for more info.
Type: string
Default: ""
collection
The name of the target collection. This field supports interpolation functions.
Type: string
operation
The mongodb operation to perform.
Type: string
Default: "update-one"
Options: insert-one
, delete-one
, delete-many
, replace-one
, update-one
.