[ 
https://issues.apache.org/jira/browse/NIFI-4588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16249806#comment-16249806
 ] 

ASF GitHub Bot commented on NIFI-4588:
--------------------------------------

Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/2259
  
    +1 LGTM, ran full build with unit tests and contrib-check (will remove some 
dead code while merging), and tested with regular and operator-enabled 
documents. A couple parting comments:
    
    1) Are you interested in adding this functionality to PutMongoRecord as 
well? If so please feel free to write a Jira and/or implement it :)
    2) Now that it supports operators, should we consider allowing an update 
query rather than just a key?
    
    In any case, this is great, thanks for the improvement! Merging to master


> Add ability to use update operators like $set and $push in PutMongo
> -------------------------------------------------------------------
>
>                 Key: NIFI-4588
>                 URL: https://issues.apache.org/jira/browse/NIFI-4588
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Mike Thomsen
>            Assignee: Mike Thomsen
>
> The current implementation of PutMongo just puts an entire document in with 
> an update. There are situations where this will definitely not work like when 
> a user needs to just update one field or push an element to array in an 
> existing document.
> The update should provide a configurable ability to push either an entire 
> JSON document (using extended JSON, as that is required by MongoDB) or use an 
> update document like this:
> {code:java}
> {
>     "$set": {
>         "strField": "Message",
>         "dateField": {
>              "$date": 1510235376611
>          }
>     },
>     "$push": {
>         "arrayField": {
>             "field": "Something here"
>         }
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to