GetMongoRecord

Description:

A record-based version of GetMongo that uses the Record writers to write the MongoDB result set.

Additional Details...

Tags:

mongo, mongodb, get, fetch, record, json

Properties:

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 NameAPI NameDefault ValueAllowable ValuesDescription
Client Servicemongo-client-serviceController Service API:
MongoDBClientService
Implementation: MongoDBControllerService
If configured, this property will use the assigned client service for connection pooling.
Record Writerget-mongo-record-writer-factoryController Service API:
RecordSetWriterFactory
Implementations: FreeFormTextRecordSetWriter
CSVRecordSetWriter
ParquetRecordSetWriter
RecordSetWriterLookup
ScriptedRecordSetWriter
XMLRecordSetWriter
JsonRecordSetWriter
AvroRecordSetWriter
The record writer to use to write the result sets.
Mongo Database NameMongo Database NameThe name of the database to use
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Mongo Collection NameMongo Collection NameThe name of the collection to use
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Schema Namemongodb-schema-name${schema.name}The name of the schema in the configured schema registry to use for the query results.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Query Output Attributemongo-query-attributeIf set, the query will be written to a specified attribute on the output flowfiles.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
QueryQueryThe 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.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
ProjectionProjectionThe fields to be returned from the documents in the result set; must be a valid BSON document
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
SortSortThe fields by which to sort; must be a valid BSON document
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
LimitLimitThe maximum number of elements to return
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Batch SizeBatch SizeThe number of elements to be returned from the server in one batch
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

Relationships:

NameDescription
successAll FlowFiles that have the results of a successful query execution go here.
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.

Reads Attributes:

None specified.

Writes Attributes:

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

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component allows an incoming relationship.

System Resource Considerations:

None specified.