docs.org.apache.nifi.processors.mongodb.PutMongoBulkOperation.additionalDetails.md Maven / Gradle / Ivy
The newest version!
# PutMongoBulkOperation
## Description:
This processor runs bulk updates against MongoDB collections. The flowfile content is expected to be a JSON array with
bulk write operations as described in
the [manual for db.collection.bulkWrite](https://www.mongodb.com/docs/manual/reference/method/db.collection.bulkWrite/).
You can use all (currently 6) operators described there. The flowfile content is returned as-is. You can merge many
operations into one - and get massive performance improvements.
## Example:
The following is an example flowfile content that does two things: insert a new document, and update all documents where
value of _hey_ is greater than zero.
```json
[
{
"insertOne": {
"document": {
"ho": 42
}
}
},
{
"updateMany": {
"filter": {
"hey": {
"$gt": 0
}
},
"update": {
"$inc": {
"hey": 2
}
}
}
}
]
```
© 2015 - 2025 Weber Informatics LLC | Privacy Policy