nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NIFI-4306) UpdateRecord does not allow user to set root path to some child record
Date Fri, 08 Sep 2017 14:58:00 GMT

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

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

Github user markap14 commented on the issue:

    https://github.com/apache/nifi/pull/2103
  
    @pvillard31 yeah at this point, the properties are given to use in a Map and not in any
guaranteed order. So the updates are applied in some arbitrary order. If you have conflicting
"rules" then there's no real way to determine what order they will be evaluated in. So if
the first rule ( / => /accounts[1]/* ) is evaluated first then /name will evaluate to `null`.
Otherwise, the /name will be updated and then the other rule will overwrite it...


> UpdateRecord does not allow user to set root path to some child record
> ----------------------------------------------------------------------
>
>                 Key: NIFI-4306
>                 URL: https://issues.apache.org/jira/browse/NIFI-4306
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>             Fix For: 1.4.0
>
>
> If i have the following record:
> {code}
> {
>   "queue": {
>      "count": 1,
>      "size": "1 MB"
>   }
> }
> {code}
> And I want to get rid of the 'queue' element I should be able to do so by using UpdateRecord
with a property name of "/" and a value of "/queue/*"
> Currently, if I try this, though, I get an error indicating that more than 1 element
has been selected. We should instead just create a 'record' object with both the 'count' and
'size' fields and set that as the root so that the result is:
> {code}
> {
>   "count": 1,
>   "size": "1 MB"
> }
> {code}



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

Mime
View raw message