Send a bulk request to MongoDB.
Execute Bulk requests in MongoDB such as inserts and deletes. Below are sample file contents that can be provided as an input to the Bulk task:
{ "insertOne" : {"firstName": "John", "lastName": "Doe", "city": "Paris"}}
{ "insertOne" : {"firstName": "Ravi", "lastName": "Singh", "city": "Mumbai"}}
{ "deleteMany": {"filter": {"city": "Bengaluru"}}}
type: "io.kestra.plugin.mongodb.Bulk"
id: mongodb_bulk
namespace: company.team
tasks:
- id: make_actions
type: io.kestra.plugin.core.storage.Write
content: |
{ "insertOne" : {"firstName": "John", "lastName": "Doe", "city": "Paris"}}
{ "insertOne" : {"firstName": "Ravi", "lastName": "Singh", "city": "Mumbai"}}
{ "deleteMany": {"filter": {"city": "Bengaluru"}}}
- id: bulk
type: io.kestra.plugin.mongodb.Bulk
connection:
uri: "mongodb://YOUR_HOST:27017"
database: "my_database"
collection: "my_collection"
from: "{{ outputs.make_actions.uri }}"
MongoDB collection.
MongoDB connection properties.
MongoDB database.
The source file.
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}
.
1000
Chunk size for every bulk request.
0
The number of documents deleted by the write operation.
0
The number of documents inserted by the write operation.
0
The number of documents matched by updates or replacements in the write operation.
0
The number of documents modified by the write operation.
The number of rows processed.
Connection string to MongoDB server.
URL format like mongodb://mongodb0.example.com: 27017