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.

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.
Mongo URIMongo URIMongoURI, typically of the form: mongodb://host1[:port1][,host2[:port2],...]
Supports Expression Language: true (will be evaluated using variable registry only)
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)
SSL Context Servicessl-context-serviceController Service API:
SSLContextService
Implementations: StandardSSLContextService
StandardRestrictedSSLContextService
The SSL Context Service used to provide client certificate information for TLS/SSL connections.
Client Authssl-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.
ModeModeinsert
  • insert
  • update
Indicates whether the processor should insert or update content
UpsertUpsertfalse
  • 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 KeyUpdate 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 Queryputmongo-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 Modeput-mongo-update-modeWith whole document
  • 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 ConcernWrite ConcernACKNOWLEDGED
  • ACKNOWLEDGED
  • UNACKNOWLEDGED
  • FSYNCED
  • JOURNALED
  • REPLICA_ACKNOWLEDGED
  • MAJORITY
  • W1
  • W2
  • W3
The write concern to use
Character SetCharacter 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.