GetMongo 2.0.0

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
  • Additional Details for GetMongo 2.0.0

    GetMongo

    Description:

    This processor runs queries against a MongoDB instance or cluster and writes the results to a flowfile. It allows input, but can run standalone as well.

    Specifying the Query

    The query can be specified in one of three ways:

    • Query configuration property.
    • Query Attribute configuration property.
    • FlowFile content.

    If a value is specified in either of the configuration properties, it will not look in the FlowFile content for a query.

    Limiting/Shaping Results

    The following options for limiting/shaping results are available:

    • Limit - limit the number of results. This should not be confused with the “batch size” option which is a setting for the underlying MongoDB driver to tell it how many items to retrieve in each poll of the server.
    • Sort - sort the result set. Requires a JSON document like { “someDate”: -1 }
    • Projection - control which fields to return. Exampe, which would remove _id: { “_id”: 0 }

    Misc Options

    Results Per FlowFile, if set, creates a JSON array out of a batch of results and writes the result to the output. Pretty Print, if enabled, will format the JSON data to be easy read by a human (ex. proper indentation of fields).

Properties
Relationships
Name Description
success All FlowFiles that have the results of a successful query execution go here.
failure All input FlowFiles that are part of a failed query execution go here.
original All input FlowFiles that are part of a successful query execution go here.
Writes Attributes
Name Description
mongo.database.name The database where the results came from.
mongo.collection.name The collection where the results came from.