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

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

Github user markap14 commented on the issue:

    https://github.com/apache/nifi/pull/2037
  
    @pvillard31 sorry it's taken me so long to get back to this - it seems to 
have slipped between the cracks. I did another review and all looks good 
(except it seems that the description of "Extract Mode" and "Split Mode" were 
reversed and "Additional Details" confirmed that so i switched it). Did some 
tests and all works as expected. Definitely a nice addition to the palette! 
Thanks! +1 merged to master.


> Create a ForkRecord processor
> -----------------------------
>
>                 Key: NIFI-4227
>                 URL: https://issues.apache.org/jira/browse/NIFI-4227
>             Project: Apache NiFi
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Pierre Villard
>            Assignee: Pierre Villard
>            Priority: Major
>             Fix For: 1.7.0
>
>         Attachments: TestForkRecord.xml
>
>
> I'd like a way to fork a record containing an array of records into multiple 
> records, each one being an element of the array. In addition, if configured 
> to, I'd like the option to add to each new record the parent fields.
> For example, if I've:
> {noformat}
> [{
>       "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
>       }]
> }]
> {noformat}
> Then, I want to generate records looking like:
> {noformat}
> [{
>       "id": 42,
>       "balance": 4750.89
> }, {
>       "id": 43,
>       "balance": 48212.38
> }, {
>       "id": 45,
>       "balance": 6578.45
> }, {
>       "id": 46,
>       "balance": 34567.21
> }]
> {noformat}
> Or, if parent fields are included, looking like:
> {noformat}
> [{
>       "name": "John Doe",
>       "address": "123 My Street",
>       "city": "My City", 
>       "state": "MS",
>       "zipCode": "11111",
>       "country": "USA",
>       "id": 42,
>       "balance": 4750.89
> }, {
>       "name": "John Doe",
>       "address": "123 My Street",
>       "city": "My City", 
>       "state": "MS",
>       "zipCode": "11111",
>       "country": "USA",
>       "id": 43,
>       "balance": 48212.38
> }, {
>       "name": "Jane Doe",
>       "address": "345 My Street",
>       "city": "Her City", 
>       "state": "NY",
>       "zipCode": "22222",
>       "country": "USA",
>       "id": 45,
>       "balance": 6578.45
> }, {
>       "name": "Jane Doe",
>       "address": "345 My Street",
>       "city": "Her City", 
>       "state": "NY",
>       "zipCode": "22222",
>       "country": "USA",
>       "id": 46,
>       "balance": 34567.21
> }]
> {noformat}



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

Reply via email to