Open shrutimantri opened 9 months ago
The file must have bulk operations, as explained here : https://www.mongodb.com/docs/manual/reference/method/db.collection.bulkWrite/
For exemple a ion file (do not start the file with an array symbol "[") :
{ "insertOne" : { "document" : "<document>" } }
{ "updateOne" : {
"filter": "<document>",
"update": "<document or pipeline>",
"upsert": "<boolean>",
"collation": "<document>",
"arrayFilters": [ "<filterdocument1>" ],
"hint": "<document/string>"
}
}
Expected Behavior
Successfully running the example given here: https://kestra.io/plugins/tasks/io.kestra.plugin.mongodb.Bulk
Actual Behaviour
The flow example of type: "io.kestra.plugin.mongodb.Bulk"mentioned in this page uses an input file in this line:
from: "{{ inputs.file }}"
But it is not clear exactly what this file should contain. It is unclear as to how to represent the operations and the command in this file. Without this information, I am unable to run this exanmple.
Note: The other MongoDB commands where input file is required is a json file containing the documents. But this one is a special case as we also need to put in the operation details along with the document.
Steps To Reproduce
Trying to run the flow example:
Environment Information
Example flow