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

Mark Payne commented on NIFI-5606:
----------------------------------

I am not opposed to allowing the creation of that parent element, but it likely 
will be non-trivial.

I also think that UpdateRecord's usage will largely be replaced with the new 
JoltTransformRecord processor, which makes a lot of things much easier :)

> UpdateRecord doesn't allow population of nested fields if input parent is null
> ------------------------------------------------------------------------------
>
>                 Key: NIFI-5606
>                 URL: https://issues.apache.org/jira/browse/NIFI-5606
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>            Reporter: Joseph Percivall
>            Priority: Major
>
> To reproduce, open the TestUpdateRecord.java processor and change the dynamic 
> properties in testFieldValuesInEL[1] to the following:
> {noformat}
> runner.setProperty("/name/last", "NiFi");
> runner.setProperty("/name/first", "Apache");{noformat}
>  
> Also, change person.json[2] to have no name field:
>  
> {noformat}
> {
>    "id": 485,
>    "mother": {
>        "last": "Doe",
>        "first": "Jane"
>    }
> }{noformat}
>  
> After running, the output is:
>  
> {noformat}
> [ { "id" : 485, "name" : null } ]{noformat}
>  
> Where the expected output would be:
> {noformat}
> {
>    "id": 485,
>    "name": {
>        "last": "NiFi",
>        "first": "Apache"
>    }
> }
> {noformat}
>  
> [1][https://github.com/apache/nifi/blob/4c787799ff7d971eb924df1e496da8338e6ab192/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestUpdateRecord.java#L303]
> [2] 
> [https://github.com/apache/nifi/blob/9ebf2cfaf1fdb1a28427aed5a8168004071efd12/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestUpdateRecord/input/person.json#L3]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to