MongoDB Delete

MongoDB Delete

Certified

Delete documents from MongoDB

Runs deleteOne (default) or deleteMany on a collection. Filter supports BSON strings or maps rendered from Flow variables.

yaml
type: io.kestra.plugin.mongodb.Delete
yaml
id: mongodb_delete
namespace: company.team

tasks:
  - id: delete
    type: io.kestra.plugin.mongodb.Delete
    connection:
      uri: "mongodb://root:example@localhost:27017/?authSource=admin"
    database: "my_database"
    collection: "my_collection"
    operation: "DELETE_ONE"
    filter:
      _id:
        $oid: 60930c39a982931c20ef6cd6
Properties

MongoDB collection

MongoDB connection properties

Definitions
uri*Requiredstring

Connection string to MongoDB server

URL format like mongodb://mongodb0.example.com: 27017

MongoDB database

Query filter

BSON string or map rendered before execution.

DefaultDELETE_ONE
Possible Values
DELETE_ONEDELETE_MANY

Delete operation

DELETE_ONE (default) or DELETE_MANY.

Reference (ref) of the pluginDefaults to apply to this task.

Default0

Documents deleted

Whether the write was acknowledged

Unitcount

Number of documents deleted from the MongoDB collection