SawmillTransformJSON

Description:

Applies a Sawmill transformation to the FlowFile JSON payload. A new FlowFile is created with transformed content and is routed to the 'success' relationship. If the transform fails, the original FlowFile is routed to the 'failure' relationship. Note that the input is expected to be a top-level JSON object not an array. If the input is an array use SawmillTransformRecord instead, and the transformation will be applied to each object. It is not currently possible to apply a Sawmill transformation to an entire top-level array.

Tags:

json, sawmill, transform, grok, tag

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Sawmill TransformationSawmill TransformationSawmill Transformation for transform of JSON data. Any NiFi Expression Language present will be evaluated first to get the final transform to be applied. The Sawmill Tutorial provides an overview of supported expressions: https://github.com/logzio/sawmill/wiki

This property requires exactly one resource to be provided. That resource may be any of the following types: text, file.

Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
MaxMind Database FileMaxMind Database FilePath to Maxmind IP Enrichment Database File

This property requires exactly one file to be provided..

Supports Expression Language: true (will be evaluated using variable registry only)
Pretty Printsawmill-transform-pretty_printfalse
  • true
  • false
Apply pretty-print formatting to the output of the Sawmill transform
Transform Cache SizeTransform Cache Size1Compiling a Sawmill Transform can be fairly expensive. Ideally, this will be done only once. However, if 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
successThe FlowFile with transformed content will be routed to this relationship
failureIf a FlowFile fails processing for any reason (for example, the FlowFile is not valid JSON), it will be routed to this relationship

Reads Attributes:

None specified.

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:

ResourceDescription
MEMORYAn instance of this component can cause high usage of this system resource. Multiple instances or high concurrency settings may result a degradation of performance.