[
https://issues.apache.org/jira/browse/NIFI-8659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17358817#comment-17358817
]
ASF subversion and git services commented on NIFI-8659:
-------------------------------------------------------
Commit 659fda10f3b7ed3d398c2ab8c1cb505880924594 in nifi's branch
refs/heads/main from Matt Burgess
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=659fda1 ]
NIFI-8659: Support multiple output records in JoltTransformRecord (#5126)
NIFI-8659: Support multiple output records in JoltTransformRecord
> JoltTransformRecord should support transformation of one record to multiple
> output records
> ------------------------------------------------------------------------------------------
>
> Key: NIFI-8659
> URL: https://issues.apache.org/jira/browse/NIFI-8659
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Matt Burgess
> Assignee: Matt Burgess
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Currently the JOLT transformation in JoltTransformRecord is applied to each
> record individually, and a single record is expected and written out. However
> there are some cases where multiple output records are desired for each input
> record, such as "hoisting" a nested array of records up to the top-level
> (without a top-level key which would make it a single record). For example:
> Input record:
> {"x": [{"a": 1, "b":2}, {"a": 3, "b": 4}, {"a": 5, "b": 6}]}
> Desired output (3 records):
> [
> {"a": 1, "b":2},
> {"a": 3, "b": 4},
> {"a": 5, "b": 6}
> ]
> This would currently still require the schema of the array elements to be
> identical, as the first transformed record's schema will be used to write all
> the output records.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)