You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Jeff (Jira)" <ji...@apache.org> on 2019/09/18 18:09:00 UTC

[jira] [Created] (NIFI-6688) UpdateRecord Processor not handling the parent ("../") operator correctly

Jeff created NIFI-6688:
--------------------------

             Summary: UpdateRecord Processor not handling the parent ("../") operator correctly
                 Key: NIFI-6688
                 URL: https://issues.apache.org/jira/browse/NIFI-6688
             Project: Apache NiFi
          Issue Type: Bug
          Components: Tools and Build
    Affects Versions: 1.9.2
            Reporter: Jeff
         Attachments: UpdateRecordScreenshot.png

I have the following JSON:

_{_ 

  _"name": "testRecord",_

  _"data": [_ 

    _\{"name":"A"},_ 

    _\{"name":"B"},_ 

    _\{"name":"C"} ]_

_}_

When I apply the UpdateRecord transform in the attached screenshot (using the parent "../" operator to reference the parent element of the wildcarded array values).   I end up with the following JSON:

_{_

  _"name": "testRecord",_ 

  _"data": [_

    _\{"key":"C", "name":"A"},_ 

    _\{"key":"C", "name":"B"},_ 

    _\{"key":"C", "name":"C"} ]_

_}_

The "../name" operator seems to return only the "name" field of the last element in the array for all cases rather than the "key" field of the parent element being updated.   This seems to work contrary to the way things should as described in

[https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.9.2/org.apache.nifi.processors.standard.UpdateRecord/additionalDetails.html]

I think output should be

_{_

  _"name": "testRecord",_ 

  _"data": [_

    _\{"key":"A", "name":"A"},_ 

    _\{"key":"B", "name":"B"},_ 

    _\{"key":"C", "name":"C"} ]_

_}_

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)