Executes a delete query against a MongoDB collection. The query is provided in the body of the flowfile and the user can select whether it will delete one or many documents that match it.
delete, mongo, mongodb
In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.
| Display Name | API Name | Default Value | Allowable Values | Description |
|---|---|---|---|---|
| Client Service | mongo-client-service | Controller Service API: MongoDBClientService Implementation: MongoDBControllerService | If configured, this property will use the assigned client service for connection pooling. | |
| Mongo Database Name | Mongo Database Name | The name of the database to use Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) | ||
| Mongo Collection Name | Mongo Collection Name | The name of the collection to use Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) | ||
| Delete Mode | delete-mongo-delete-mode | Delete One |
| Choose between deleting one document by query or many documents by query. |
| Fail When Nothing Is Deleted | delete-mongo-fail-on-no-delete | True |
| Determines whether to send the flowfile to the success or failure relationship if nothing is successfully deleted. |
| Name | Description |
|---|---|
| success | All FlowFiles that are written to MongoDB are routed to this relationship |
| failure | All FlowFiles that cannot be written to MongoDB are routed to this relationship |
| Name | Description |
|---|---|
| mongodb.delete.mode | Configurable parameter for controlling delete mode on a per-flowfile basis. The process must be configured to use this option. Acceptable values are 'one' and 'many.' |