[
https://issues.apache.org/jira/browse/NIFI-7729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17175879#comment-17175879
]
ASF subversion and git services commented on NIFI-7729:
-------------------------------------------------------
Commit 869c4236c46694a8deda9c2b4d11172558728eb9 in nifi's branch
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=869c423 ]
NIFI-7729: Ensure that if a script used in the ScriptedTransformRecord
processor introduces a new field to the schema that the field gets incorporated
into the schema.
NIFI-7729: Updated docs to explain how to add new fields to Records via
ScriptedTransformRecord and added example. Fixed checkstyle violation.
NIFI-7729: Always call Record.incorporateInactiveFields with
ScriptedTransformRecord
Signed-off-by: Matthew Burgess <[email protected]>
This closes #4470
> ScriptedTransformRecord doesn't update record with inferred schema
> ------------------------------------------------------------------
>
> Key: NIFI-7729
> URL: https://issues.apache.org/jira/browse/NIFI-7729
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework
> Affects Versions: 1.12.0
> Environment: Linux,
> Reporter: Timothy Fleming
> Assignee: Mark Payne
> Priority: Major
> Fix For: 1.12.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Using ScriptedTransformRecord with JsonTreeReader. The Record schema is
> inferred from the json. If I update the record in code, e.g.
> {{record.setValue('newfieldname', 'newfieldvalue')}}
> The JsonRecordSetWriter apparently doesn't update the schema and doesn't
> write the new field.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)