You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "David Mollitor (JIRA)" <ji...@apache.org> on 2019/06/28 17:54:00 UTC

[jira] [Commented] (NIFI-6406) ForkReader Extract Not Working As Advertised

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

David Mollitor commented on NIFI-6406:
--------------------------------------

May not be an issue... I think I see what's wrong...

> ForkReader Extract Not Working As Advertised
> --------------------------------------------
>
>                 Key: NIFI-6406
>                 URL: https://issues.apache.org/jira/browse/NIFI-6406
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 1.9.2
>            Reporter: David Mollitor
>            Priority: Major
>
> I am looking at the {{ForkRecord}} processor and trying to reproduce the example provided here:
> [https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.9.2/org.apache.nifi.processors.standard.ForkRecord/additionalDetails.html]
> In particular, I am looking at _Example 2 - Extracting with parent fields_
> My input:
> {code}
> [{
>         "id": 1,
>         "name": "John Doe",
>         "address": "123 My Street",
>         "city": "My City",
>         "state": "MS",
>         "zipCode": "11111",
>         "country": "USA",
>         "accounts": [{
>                 "id": 42,
>                 "balance": 4750.89
>         }, {
>                 "id": 43,
>                 "balance": 48212.38
>         }]
> },
> {
>         "id": 2,
>         "name": "Jane Doe",
>         "address": "345 My Street",
>         "city": "Her City",
>         "state": "NY",
>         "zipCode": "22222",
>         "country": "USA",
>         "accounts": [{
>                 "id": 45,
>                 "balance": 6578.45
>         }, {
>                 "id": 46,
>                 "balance": 34567.21
>         }]
> }]
> {code}
> My output:
> {code}
> [ {
>   "id" : 42,
>   "name" : "John Doe",
>   "address" : "123 My Street",
>   "city" : "My City",
>   "state" : "MS",
>   "zipCode" : "11111",
>   "country" : "USA",
>   "accounts" : [ {
>     "id" : 42,
>     "balance" : 4750.89
>   }, {
>     "id" : 43,
>     "balance" : 48212.38
>   } ]
> }, {
>   "id" : 43,
>   "name" : "John Doe",
>   "address" : "123 My Street",
>   "city" : "My City",
>   "state" : "MS",
>   "zipCode" : "11111",
>   "country" : "USA",
>   "accounts" : [ {
>     "id" : 42,
>     "balance" : 4750.89
>   }, {
>     "id" : 43,
>     "balance" : 48212.38
>   } ]
> }, {
>   "id" : 45,
>   "name" : "Jane Doe",
>   "address" : "345 My Street",
>   "city" : "Her City",
>   "state" : "NY",
>   "zipCode" : "22222",
>   "country" : "USA",
>   "accounts" : [ {
>     "id" : 45,
>     "balance" : 6578.45
>   }, {
>     "id" : 46,
>     "balance" : 34567.21
>   } ]
> }, {
>   "id" : 46,
>   "name" : "Jane Doe",
>   "address" : "345 My Street",
>   "city" : "Her City",
>   "state" : "NY",
>   "zipCode" : "22222",
>   "country" : "USA",
>   "accounts" : [ {
>     "id" : 45,
>     "balance" : 6578.45
>   }, {
>     "id" : 46,
>     "balance" : 34567.21
>   } ]
> } ]
> {code}
> I expect there to be 4 records (2x2) and there are,... but each record caries all of the fields instead of extracting them (see the output example in the docs).  It looks more like a cross-join than anything.
> The 'split' function worked as expected.



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