Skip to main content

DeleteMongo

Description

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.

Tags

delete, mongo, mongodb

Properties

In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Client Servicemongo-client-serviceController Service:
MongoDBClientService

Implementations:
MongoDBControllerService
If configured, this property will use the assigned client service for connection pooling.
Mongo Database Name *Mongo Database NameThe name of the database to use

Supports Expression Language, using FlowFile attributes and Environment variables.
Mongo Collection Name *Mongo Collection NameThe name of the collection to use

Supports Expression Language, using FlowFile attributes and Environment variables.
Delete Modedelete-mongo-delete-modeDelete One
  • Delete One
  • Delete Many
  • Use 'mongodb.delete.mode' attribute
Choose between deleting one document by query or many documents by query.
Fail When Nothing Is Deleteddelete-mongo-fail-on-no-deleteTrue
  • True
  • False
Determines whether to send the flowfile to the success or failure relationship if nothing is successfully deleted.

Dynamic Properties

This component does not support dynamic properties.

Relationships

NameDescription
failureAll FlowFiles that cannot be written to MongoDB are routed to this relationship
successAll FlowFiles that are written to MongoDB are routed to this relationship

Reads Attributes

NameDescription
mongodb.delete.modeConfigurable 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.'

Writes Attributes

This processor does not write attributes.

State Management

This component does not store state.

Restricted

This component is not restricted.

Input Requirement

This component requires an incoming relationship.

System Resource Considerations

This component does not specify system resource considerations.

See Also