Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-5589

Clarify putMongo documentation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      Today the putMongoDB documentation is very vugae and leads to alot of playing around to understand exactly how it works. We would improve the documentation so that others can immediately start to use this processor successfully. 

       

      My largest issues where around understanding how the UpdateQuery works, and the expected content + operators that can be used when performing the update with operators and not just replacing the entire document. 

       

       

      Here is a misc note I made on my experience doing this.

      With the putMongo processor the updateQuery is like a find() in the mongo CLI, all documents that match the find will be replaced with the flowfile content. The update mode has 2 choices; whole document or with operators. If your updating the entire document it expects the json to be properly formated. The UpdateQuery will return to this processor the documents which need to be completely replaced with the incoming FlowFile content.  If your using this with operators its expected that the FlowFile content ONLY be the operator part you need is {$set: 

      {"f1": "val1"}

       , $inc :{ "count" : 10}}, it doesnt not support the find() portion that you would expect in the CLI, that part is the 'UpdateQuery'

      Attachments

        Activity

          People

            vijeta Vijeta Hingorani
            josephxsxn Joseph Niemiec
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: