Delete one or more documents from a MongoDB collection.

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.

MongoDB database.

MongoDB BSON filter.

Can be a BSON string, or a map.

Default DELETE_ONE
Possible Values
DELETE_ONEDELETE_MANY

Operation to use.

Default 0

The number of documents deleted.

Whether the write was acknowledged.

Connection string to MongoDB server.

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