RunMongoAggregation 2025.10.9.21

Bundle

org.apache.nifi | nifi-mongodb-nar

Description

A processor that runs an aggregation query whenever a flowfile is received.

Tags

aggregate, aggregation, mongo

Input Requirement

ALLOWED

Supports Sensitive Dynamic Properties

false

Properties

PropertyDescription
Batch SizeThe number of elements returned from the server in one batch.
Mongo Collection NameThe name of the collection to use
Mongo Database NameThe name of the database to use
allow-disk-useSet this to true to enable writing data to temporary files to prevent exceeding the maximum memory use limit during aggregation pipeline staged when handling large datasets.
json-typeBy default, MongoDB’s Java driver returns “extended JSON”. Some of the features of this variant of JSON may cause problems for other JSON parsers that expect only standard JSON types and conventions. This configuration setting controls whether to use extended JSON or provide a clean view that conforms to standard JSON.
mongo-agg-queryThe aggregation query to be executed.
mongo-charsetSpecifies the character set of the document data.
mongo-client-serviceIf configured, this property will use the assigned client service for connection pooling.
mongo-date-formatThe date format string to use for formatting Date fields that are returned from Mongo. It is only applied when the JSON output format is set to Standard JSON.
mongo-query-attributeIf set, the query will be written to a specified attribute on the output flowfiles.
results-per-flowfileHow many results to put into a flowfile at once. The whole body will be treated as a JSON array of results.

Relationships

NameDescription
failureThe input flowfile gets sent to this relationship when the query fails.
originalThe input flowfile gets sent to this relationship when the query succeeds.
resultsThe result set of the aggregation will be sent to this relationship.