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

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

Github user MikeThomsen commented on the issue:

    https://github.com/apache/nifi/pull/2259
  
    Thanks!
    
    1. We can't because "$" is an illegal starting character in Avro. That's 
why I was grumbling about "$date" operations on the mailing list. Fortunately, 
for simple puts there is a good work around.
    
    2. Yeah, we could. I think that would need to support EL too.


> 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
>             Fix For: 1.5.0
>
>
> 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