Delete
yaml
type: "io.kestra.plugin.mongodb.Delete"
Delete one or many documents
Examples
yaml
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
- Type: string
- Dynamic: ✔️
- Required: ✔️
The mongodb collection.
connection
- Type: MongoDbConnection
- Dynamic: ❓
- Required: ✔️
The connection properties.
database
- Type: string
- Dynamic: ✔️
- Required: ✔️
The mongodb database.
operation
- Type: string
- Dynamic: ❌
- Required: ✔️
- Default:
DELETE_ONE
- Possible Values:
DELETE_ONE
DELETE_MANY
Operation to use
filter
- Type: object
- Dynamic: ✔️
- Required: ❌
The mongodb bson filter
Can be a bson string, or a map
Outputs
deletedCount
- Type: integer
- Default:
0
The number of documents deleted.
wasAcknowledged
- Type: boolean
true if the write was acknowledged.
Definitions
MongoDbConnection
uri
- Type: string
- Dynamic: ✔️
- Required: ✔️
- Min length:
1
Connection string to mongodb server
url format like mongodb://mongodb0.example.com:27017