[
https://issues.apache.org/jira/browse/NIFI-13423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Payne updated NIFI-13423:
------------------------------
Description:
Given the following JSON:
{code:java}
{ "records": [{"field1": "value1", "field2": "value2"}] }
{ "records": [{"field3": "value3", "field4": "value4"}] }
{ "records": [{"field5": "value5", "field6": "value6"}] }{code}
If we configured Json Tree Reader with a starting field strategy of "Use Root
Node" it reads the data correctly.
However, if we set the Starting Field Strategy to use the nested field
"records" it reads only 2 records:
{code:java}
{"field1": "value1"}
{"field2": "value2"}{code}
It should be reading 6 records in this case:
{code:java}
{"field1": "value1"}
{"field2": "value2"}
{"field3": "value3"}
{"field4": "value4"}
{"field5": "value5"}
{"field6": "value6"}{code}
It doesn't matter whether the input is a JSON Array or in JSON Lines format.
was:
Given the following JSON:
{code:java}
{ "records": [{"field1": "value1", "field2": "value2"}] }
{ "records": [{"field3": "value3", "field4": "value4"}] }
{ "records": [{"field5": "value5", "field6": "value6"}] }{code}
If we configured Json Tree Reader with a starting field strategy of "Use Root
Node" it reads the data correctly.
However, if we set the Starting Field Strategy to use the nested field
"records" it reads only 2 records:
{code:java}
{"field1": "value1"}
{"field2": "value2"}{code}
It should be reading 6 records in this case.
It doesn't matter whether the input is a JSON Array or in JSON Lines format.
> JsonTreeReader, when configured with a "Starting Field Strategy" of "Nested
> Field" drops all but first record
> -------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-13423
> URL: https://issues.apache.org/jira/browse/NIFI-13423
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Blocker
> Fix For: 2.0.0-M4
>
>
> Given the following JSON:
> {code:java}
> { "records": [{"field1": "value1", "field2": "value2"}] }
> { "records": [{"field3": "value3", "field4": "value4"}] }
> { "records": [{"field5": "value5", "field6": "value6"}] }{code}
> If we configured Json Tree Reader with a starting field strategy of "Use Root
> Node" it reads the data correctly.
> However, if we set the Starting Field Strategy to use the nested field
> "records" it reads only 2 records:
> {code:java}
> {"field1": "value1"}
> {"field2": "value2"}{code}
> It should be reading 6 records in this case:
> {code:java}
> {"field1": "value1"}
> {"field2": "value2"}
> {"field3": "value3"}
> {"field4": "value4"}
> {"field5": "value5"}
> {"field6": "value6"}{code}
> It doesn't matter whether the input is a JSON Array or in JSON Lines format.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)