You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2024/06/20 17:52:00 UTC
[jira] [Commented] (NIFI-13423) JsonTreeReader, when configured with a "Starting Field Strategy" of "Nested Field" drops all but first record
[ https://issues.apache.org/jira/browse/NIFI-13423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17856574#comment-17856574 ]
ASF subversion and git services commented on NIFI-13423:
--------------------------------------------------------
Commit 4636d9c79da053da178b26709e155db0f5680051 in nifi's branch refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=4636d9c79d ]
NIFI-13423 Corrected Starting Field handling in JsonTreeReader
Ensure that when using a Starting Field Name, JsonTreeReader is still able to process all records
This closes #8989
Signed-off-by: David Handermann <ex...@apache.org>
> 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)