[ 
https://issues.apache.org/jira/browse/NIFI-6688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard resolved NIFI-6688.
----------------------------------
    Resolution: Feedback Received

Apache NiFi 1.x is no longer maintained and no new release is planned on the 
1.x release line. Marking as resolved as part of a cleanup operation. Please 
open a new one with an updated description if this is still relevant for NiFi 
2.x.

> 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
>            Priority: Major
>         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.20.10#820010)

Reply via email to