ScriptedTransformRecord 2025.10.9.21

Bundle

org.apache.nifi | nifi-scripting-nar

Description

Provides the ability to evaluate a simple script against each record in an incoming FlowFile. The script may transform the record in some way, filter the record, or fork additional records. See Processor’s Additional Details for more information.

Tags

filter, groovy, modify, record, script, transform, update

Input Requirement

REQUIRED

Supports Sensitive Dynamic Properties

false

Properties

PropertyDescription
Module DirectoryComma-separated list of paths to files and/or directories which contain modules required by the script.
Record ReaderThe Record Reader to use parsing the incoming FlowFile into Records
Record WriterThe Record Writer to use for serializing Records after they have been transformed
Script BodyBody of script to execute. Only one of Script File or Script Body may be used
Script EngineThe Language to use for the script
Script FilePath to script file to execute. Only one of Script File or Script Body may be used

Restrictions

Required PermissionExplanation
execute codeProvides operator the ability to execute arbitrary code assuming all permissions that NiFi has.

Relationships

NameDescription
failureAny FlowFile that cannot be transformed will be routed to this Relationship
successEach FlowFile that were successfully transformed will be routed to this Relationship

Writes attributes

NameDescription
mime.typeSets the mime.type attribute to the MIME Type specified by the Record Writer
record.countThe number of records in the FlowFile
record.error.messageThis attribute provides on failure the error message encountered by the Reader or Writer.

See also