Pierre Villard created NIFI-15329:
-------------------------------------
Summary: RenameRecordField does not work with multiple records
Key: NIFI-15329
URL: https://issues.apache.org/jira/browse/NIFI-15329
Project: Apache NiFi
Issue Type: Bug
Reporter: Pierre Villard
Assignee: Pierre Villard
As soon as the input FlowFile contains multiple records, the processor
RenameRecordField will not work: it will properly process the first record but
will drop the fields supposed to be renamed in the following records.
Input:
{code:json}
[ {
"address" : "301 Leffler Forks, Port Phillipfurt, VA 55374",
"name" : "Alejandro Purdy"
}, {
"address" : "Apt. 926 052 Eldon Crest, Lake Ashelyborough, CO 59917",
"name" : "Cecil Marvin"
}, {
"address" : "496 Toy Hills, Maggioton, NY 85654",
"name" : "Desire Fadel"
}, {
"address" : "Suite 989 4494 Hirthe Fields, North Talitha, AK 00766",
"name" : "Suzann Wiegand"
}, {
"address" : "842 Bruen Cape, Port Fiona, IA 85672",
"name" : "Zachariah Legros"
}]
{code}
Configuration:
* Default JSON Reader
* Default JSON Writer
* Dynamic Property: /name -> newName
Output:
{code:json}
[ {
"address" : "301 Leffler Forks, Port Phillipfurt, VA 55374",
"newName" : "Alejandro Purdy"
}, {
"address" : "Apt. 926 052 Eldon Crest, Lake Ashelyborough, CO 59917"
}, {
"address" : "496 Toy Hills, Maggioton, NY 85654"
}, {
"address" : "Suite 989 4494 Hirthe Fields, North Talitha, AK 00766"
}, {
"address" : "842 Bruen Cape, Port Fiona, IA 85672"
}]
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)