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

Pierre Villard commented on NIFI-8269:
--------------------------------------

[~mattyb149] - the way you have configured your XML Reader, the inferred data 
would look like:
{code:java}
[ {
  "sessionTask" : [ {
    "taskId" : 1,
    "targetTable" : "S_WDMD_WD_L_ADDITIONAL_INFO",
    "column" : [ {
      "name" : "email",
      "dataType" : "string"
    }, {
      "name" : "phone",
      "dataType" : "string"
    } ]
  }, {
    "taskId" : 1,
    "targetTable" : "S_WDMD_WD_L_IDENTIFIER",
    "column" : [ {
      "name" : "id",
      "dataType" : "integer"
    }, {
      "name" : "fullName",
      "dataType" : "string"
    } ]
  } ]
} ] {code}
So there is no "workflow" level anymore (it is removed by the XML reader) and 
that is why the path "/workflow/sessionTask" does not work but "//sessionTask" 
works.

> Improve ForkRecord to inherit schema from the array being forked
> ----------------------------------------------------------------
>
>                 Key: NIFI-8269
>                 URL: https://issues.apache.org/jira/browse/NIFI-8269
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Pierre Villard
>            Assignee: Pierre Villard
>            Priority: Major
>         Attachments: NIFI-8269_array_error.json
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> At the moment the ForkRecord processor will require the writer to be 
> configured with a schema corresponding to what will be output. We could make 
> things more clever to inherit the schema from the reader and change it based 
> on the operation being performed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to