Writes the contents of a FlowFile to MongoDB
mongodb, insert, update, write, put
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 Name | API Name | Default Value | Allowable Values | Description |
---|---|---|---|---|
Client Service | mongo-client-service | Controller Service API: MongoDBClientService Implementation: MongoDBControllerService | If configured, this property will use the assigned client service for connection pooling. | |
Mongo URI | Mongo URI | MongoURI, typically of the form: mongodb://host1[:port1][,host2[:port2],...] Supports Expression Language: true (will be evaluated using variable registry only) | ||
Mongo Database Name | Mongo Database Name | The name of the database to use Supports Expression Language: true (will be evaluated using flow file attributes and variable registry) | ||
Mongo Collection Name | Mongo Collection Name | The name of the collection to use Supports Expression Language: true (will be evaluated using flow file attributes and variable registry) | ||
SSL Context Service | ssl-context-service | Controller Service API: SSLContextService Implementations: StandardRestrictedSSLContextService StandardSSLContextService | The SSL Context Service used to provide client certificate information for TLS/SSL connections. | |
Client Auth | ssl-client-auth | REQUIRED |
| 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. |
Mode | Mode | insert |
| Indicates whether the processor should insert or update content |
Upsert | Upsert | 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 Key | Update Query Key | Key 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 Query | putmongo-update-query | Specify 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 Mode | put-mongo-update-mode | With whole document |
| 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 Concern | Write Concern | ACKNOWLEDGED |
| The write concern to use |
Character Set | Character Set | UTF-8 | The Character Set in which the data is encoded |
Name | Description |
---|---|
success | All FlowFiles that are written to MongoDB are routed to this relationship |
failure | All FlowFiles that cannot be written to MongoDB are routed to this relationship |
Resource | Description |
---|---|
MEMORY | An instance of this component can cause high usage of this system resource. Multiple instances or high concurrency settings may result a degradation of performance. |