Uwe, Personally I don't have that much experience with MongoDB, but the additional functionality you described sounds like something we would want to support. Looking through JIRA I only see one ticket related to MongoDB to add SSL support [1] so I think it would be great to create a new JIRA to capture these ideas and any specifics about how you envision it working.
Thanks, Bryan [1] https://issues.apache.org/jira/browse/NIFI-1197 On Fri, Mar 4, 2016 at 6:43 PM, Uwe Geercken <uwe.geerc...@web.de> wrote: > Hello, > > I have tried to use the PutMongo processor. I read Json files from a > folder and send them to a mongo database. > > The insert of documents works seamlessly. > > Next I tested updates. The problem here is that for the update a complete > document is required. So if you insert a document with 5 key/value pairs > and then make an update using a Json with only 3 key/value pairs then 2 > fields are gone after the update. This is a known behavior in mongodb. But > mongodb also supports doing updates using the $set operator. In this case > the key/values pairs procided get updated and the others remain untouched. > But the nifi processor does not seem to support this technique. > > I then went on to test upserts. Same problem here as upserts are basically > the same as updates. But I laso found out that the processor does not > support some of the other more enhanced operators such as $push (push a > key/value into an array) or the $inc operator (increment). > > The error message from the nifi log says: > java.lang.IllegalArgumentException: Invalid BSON field name $push - for > example. > > So I think there is currently only limited support for mongodb. But I hope > this will be enhanced in the near future taking the importance of mongodb. > > What is your experiece with this processor? Or maybe you have a workaround? > > Rgds, > > Uwe > > >