JoltTransformJSON 2025.10.9.21

Bundle

org.apache.nifi | nifi-jolt-nar

Description

Applies a list of Jolt specifications to either the FlowFile JSON content or a specified FlowFile JSON attribute. If the JSON transform fails, the original FlowFile is routed to the ‘failure’ relationship.

Tags

cardinality, chainr, default, jolt, json, remove, shift, sort, transform

Input Requirement

REQUIRED

Supports Sensitive Dynamic Properties

false

Properties

PropertyDescription
Custom Module DirectoryComma-separated list of paths to files and/or directories which contain modules containing custom transformations (that are not included on NiFi’s classpath).
Custom Transformation Class NameFully Qualified Class Name for Custom Transformation
JSON SourceSpecifies whether the Jolt transformation is applied to FlowFile JSON content or to specified FlowFile JSON attribute.
JSON Source AttributeThe FlowFile attribute containing JSON to be transformed.
Jolt SpecificationJolt Specification for transformation of JSON data. The value for this property may be the text of a Jolt specification or the path to a file containing a Jolt specification. ‘Jolt Specification’ must be set, or the value is ignored if the Jolt Sort Transformation is selected.
Jolt TransformSpecifies the Jolt Transformation that should be used with the provided specification.
Max String LengthThe maximum allowed length of a string value when parsing the JSON document
Pretty PrintApply pretty print formatting to the output of the Jolt transform
Transform Cache SizeCompiling a Jolt Transform can be fairly expensive. Ideally, this will be done only once. However, if the Expression Language is used in the transform, we may need a new Transform for each FlowFile. This value controls how many of those Transforms we cache in memory in order to avoid having to compile the Transform each time.

Relationships

NameDescription
failureIf the JSON transformation fails (e.g., due to invalid JSON in the content or attribute), the original FlowFile is routed to this relationship.
successThe FlowFile with successfully transformed content or updated attribute will be routed to this relationship

Writes attributes

NameDescription
mime.typeAlways set to application/json