[
https://issues.apache.org/jira/browse/NIFI-9862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lehel Boér reassigned NIFI-9862:
--------------------------------
Assignee: Lehel Boér
> Update JsonTreeReader to read Records from a Nested Array
> ---------------------------------------------------------
>
> Key: NIFI-9862
> URL: https://issues.apache.org/jira/browse/NIFI-9862
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: David Handermann
> Assignee: Lehel Boér
> Priority: Minor
>
> The {{JsonTreeReader}} leverages the Jackson JSON streaming API to read one
> or more records from an {{{}InputStream{}}}. The supporting {{RecordReader}}
> implementation expects input JSON to be formatted with the an array as the
> root element, or an object containing the entire Record. This approach
> supports streamed reading of JSON objects contained within an array as the
> root element, but does not support streaming of JSON objects contained within
> an array nested inside a wrapping root object.
> Some services provide JSON responses that include multiple records in a
> wrapping root object as follows:
> {noformat}
> {
> "total": 2,
> "records": [
> {
> "id": 1
> },
> {
> "id": 2
> }
> ]
> }
> {noformat}
> In order to enable streamed processing of nested records, the
> {{JsonTreeReader}} should be updated to support an optional property defining
> the Property Name of a nested field containing records.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)