GetMongo 2025.10.9.21

Bundle

org.apache.nifi | nifi-mongodb-nar

Description

Creates FlowFiles from documents in MongoDB loaded by a user-specified query.

Tags

get, mongodb, read

Input Requirement

ALLOWED

Supports Sensitive Dynamic Properties

false

Properties

PropertyDescription
Batch SizeThe number of elements to be returned from the server in one batch
LimitThe maximum number of elements to return
Mongo Collection NameThe name of the collection to use
Mongo Database NameThe name of the database to use
ProjectionThe fields to be returned from the documents in the result set; must be a valid BSON document
QueryThe selection criteria to do the lookup. If the field is left blank, it will look for input from an incoming connection from another processor to provide the query as a valid JSON document inside of the FlowFile’s body. If this field is left blank and a timer is enabled instead of an incoming connection, that will result in a full collection fetch using a “{}” query.
SortThe fields by which to sort; must be a valid BSON document
get-mongo-send-emptyIf a query executes successfully, but returns no results, send an empty JSON document signifying no result.
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-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.
use-pretty-printingChoose whether or not to pretty print the JSON from the results of the query. Choosing ‘True’ can greatly increase the space requirements on disk depending on the complexity of the JSON document

Relationships

NameDescription
failureAll input FlowFiles that are part of a failed query execution go here.
originalAll input FlowFiles that are part of a successful query execution go here.
successAll FlowFiles that have the results of a successful query execution go here.

Writes attributes

NameDescription
mongo.database.nameThe database where the results came from.
mongo.collection.nameThe collection where the results came from.