PutMongo

Description:

Writes the contents of a FlowFile to MongoDB

Additional Details...

Tags:

mongodb, insert, update, write, put

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.

NameDefault ValueAllowable ValuesDescription
Client ServiceController Service API:
MongoDBClientService
Implementation: MongoDBControllerService
If configured, this property will use the assigned client service for connection pooling.
Mongo URIMongoURI, typically of the form: mongodb://host1[:port1][,host2[:port2],...]
Supports Expression Language: true (will be evaluated using variable registry only)
Mongo Database NameThe name of the database to use
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Mongo Collection NameThe name of the collection to use
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
SSL Context ServiceController Service API:
SSLContextService
Implementations: StandardRestrictedSSLContextService
StandardSSLContextService
The SSL Context Service used to provide client certificate information for TLS/SSL connections.
Client AuthREQUIRED
  • WANT
  • REQUIRED
  • NONE
Client authentication policy when connecting to secure (TLS/SSL) cluster. Possible values are REQUIRED, WANT, NONE. This property is only used when an SSL Context has been defined and enabled.
Modeinsert
  • insert
  • update
Indicates whether the processor should insert or update content
Upsertfalse
  • true
  • false
When true, inserts a document if no document matches the update query criteria; this property is valid only when using update mode, otherwise it is ignored
Update Query KeyKey name used to build the update query criteria; this property is valid only when using update mode, otherwise it is ignored. Example: _id
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Update QuerySpecify a full MongoDB query to be used for the lookup query to do an update/upsert.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Update Modedoc
  • With whole document
  • With operators enabled
Choose an update mode. You can either supply a JSON document to use as a direct replacement or specify a document that contains update operators like $set, $unset, and $inc. When Operators mode is enabled, the flowfile content is expected to be the operator part for example: {$set:{"key": "value"},$inc:{"count":1234}} and the update query will come from the configured Update Query property.
Write ConcernACKNOWLEDGED
  • ACKNOWLEDGED
  • UNACKNOWLEDGED
  • FSYNCED
  • JOURNALED
  • REPLICA_ACKNOWLEDGED
  • MAJORITY
The write concern to use
Character SetUTF-8The Character Set in which the data is encoded

Relationships:

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

Reads Attributes:

None specified.

Writes Attributes:

None specified.

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:

ResourceDescription
MEMORYAn instance of this component can cause high usage of this system resource. Multiple instances or high concurrency settings may result a degradation of performance.