raghu
raghu

Reputation: 398

Apache NiFi JoltTransformJSON processor attribute as jolt spec

I have a JoltTransformJSON processor. I want to use the FlowFile attribute (containing the Jolt spec) as the specification.

When I attempt to do it, there is a validation error "JSON Spec provided is not valid JSON format".

I use NiFi 1.6

Is it possible to specify jolt spec as an attribute? attribute as jolt spec validation error

Upvotes: 1

Views: 904

Answers (1)

Sivaprasanna Sethuraman
Sivaprasanna Sethuraman

Reputation: 4132

Jolt Specification supports NiFi Expression Language but only for substituting the values inside the spec. That is:

Say you have a NiFi attribute : jolt.operation: shift you can refer that inside your spec as:

[
    {
        "operation" : ${jolt.operation},
        ...
        ...
    }
]

The entire spec cannot be sent as a flowfile attribute, at least as of now.

Upvotes: 2

Related Questions