Skip to main content

JoltTransformJSON

Description

Applies a list of Jolt specifications to the flowfile JSON payload. A new FlowFile is created with transformed content and is routed to the 'success' relationship. If the JSON transform fails, the original FlowFile is routed to the 'failure' relationship.

Tags

cardinality, chainr, defaultr, jolt, json, removr, shiftr, sort, transform

Properties

In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Jolt Transform *Jolt TransformChain
  • Shift
  • Chain
  • Default
  • Remove
  • Cardinality
  • Sort
  • Custom
  • Modify - Default
  • Modify - Overwrite
  • Modify - Define
Specifies the Jolt Transformation that should be used with the provided specification.
Jolt SpecificationJolt 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.

Supports Expression Language, using FlowFile attributes and Environment variables.
Custom Transformation Class NameCustom Transformation Class NameFully Qualified Class Name for Custom Transformation

Supports Expression Language, using FlowFile attributes and Environment variables.

This property is only considered if:
  • the property Jolt Transform has a value of jolt-transform-custom
Custom Module DirectoryCustom 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).

Supports Expression Language, using Environment variables.

This property is only considered if:
  • the property Jolt Transform has a value of jolt-transform-custom
Transform Cache Size *Transform Cache Size1Compiling 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.
Pretty Print *Pretty Printfalse
  • true
  • false
Apply pretty print formatting to the output of the Jolt transform
Max String Length *Max String Length20 MBThe maximum allowed length of a string value when parsing the JSON document

Dynamic Properties

This component does not support dynamic properties.

Relationships

NameDescription
failureIf a FlowFile fails processing for any reason (for example, the FlowFile is not valid JSON), it will be routed to this relationship
successThe FlowFile with transformed content will be routed to this relationship

Reads Attributes

This processor does not read attributes.

Writes Attributes

NameDescription
mime.typeAlways set to application/json

State Management

This component does not store state.

Restricted

This component is not restricted.

Input Requirement

This component requires an incoming relationship.

System Resource Considerations

This component does not specify system resource considerations.

See Also