From be3a9072cdff71310dd394e2208d60939625adf1 Mon Sep 17 00:00:00 2001 From: Mike Thomsen Date: Wed, 11 Jul 2018 15:11:25 -0400 Subject: [PATCH] NIFI-5412 Added additional documentation for PutMongo. --- .../additionalDetails.html | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/resources/docs/org.apache.nifi.processors.mongodb.PutMongo/additionalDetails.html diff --git a/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/resources/docs/org.apache.nifi.processors.mongodb.PutMongo/additionalDetails.html b/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/resources/docs/org.apache.nifi.processors.mongodb.PutMongo/additionalDetails.html new file mode 100644 index 000000000000..54204df8129b --- /dev/null +++ b/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/resources/docs/org.apache.nifi.processors.mongodb.PutMongo/additionalDetails.html @@ -0,0 +1,77 @@ + + + + + + PutMongo + + + + + +

Description:

+

+ This processor is a general purpose processor for inserting, upserting and updating MongoDB collections. +

+

Inserting Documents

+

+ Each flowfile is assumed to contain only a single MongoDB document to be inserted. The contents must be valid JSON. + The input the Mongo shell accepts should not be confused with valid JSON. It does not support batch writes at this time. +

+

Updating and Upserting

+ +

Update Modes

+

+ There are two methods for choosing what gets written to a document when updating: +

+ + +

+ There are two ways to update: +

+ + +

Update Key

+

+ The update key method takes keys from the document and builds a query from them. It will attempt to parse the _id + field as an ObjectID type if that is one of the keys that is specified in the configuration field. Multiple keys + can be specified by separating them with commas. This configuration field supports Expression Language, so it can + derived in part or entirely from flowfile attributes. +

+ +

Update Query

+

+ The update query method takes a valid JSON document as its value and uses it to find one or more documents to update. + This field supports Expression Language, so it can be derived in part or entirely from flowfile attributes. It is possible, + for instance, to put an attribute named update_query on a flowfile and specify ${update_query} in the + configuration field so it will load the value from the flowfile. +

+ +

Upserts

+

+ If the upsert mode is enabled, PutMongo will insert a new document that matches the search criteria (be it a user-supplied + query or one built from update keys) and give it the properties that are specified in the JSON document provided in the + flowfile content. This feature should be used carefully, as it can result in incomplete data being added to MongoDB. +

+ + \ No newline at end of file