Delete
Delete one or more documents from a MongoDB collection.
yaml
type: "io.kestra.plugin.mongodb.Delete"Examples
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
collection *Requiredstring
MongoDB collection.
connection *RequiredNon-dynamicMongoDbConnection
MongoDB connection properties.
database *Requiredstring
MongoDB database.
filter object
MongoDB BSON filter
Can be a BSON string or a map.
operation string
 Default 
DELETE_ONE Possible Values 
DELETE_ONEDELETE_MANYOperation to use
Outputs
deletedCount integer
 Default 
0The number of documents deleted
wasAcknowledged boolean
Whether the write was acknowledged
Metrics
deleted.count counter
 Unit 
countNumber of documents deleted from the MongoDB collection
Definitions
io.kestra.plugin.mongodb.MongoDbConnection
uri *Requiredstring
Connection string to MongoDB server
URL format like mongodb://mongodb0.example.com: 27017