简体   繁体   English

Apache NiFi JoltTransformJSON处理器属性作为Jolt规范

[英]Apache NiFi JoltTransformJSON processor attribute as jolt spec

I have a JoltTransformJSON processor. 我有一个JoltTransformJSON处理器。 I want to use the FlowFile attribute (containing the Jolt spec) as the specification. 我想使用FlowFile属性(包含Jolt规范)作为规范。

When I attempt to do it, there is a validation error "JSON Spec provided is not valid JSON format". 当我尝试执行此操作时,出现验证错误“提供的JSON规范无效的JSON格式”。

I use NiFi 1.6 我使用NiFi 1.6

Is it possible to specify jolt spec as an attribute? 是否可以将震动规格指定为属性? 属性为震动规格 验证错误

Jolt Specification supports NiFi Expression Language but only for substituting the values inside the spec. Jolt Specification支持NiFi Expression Language但仅用于替代规范中的值。 That is: 那是:

Say you have a NiFi attribute : jolt.operation: shift you can refer that inside your spec as: 假设您具有NiFi属性: jolt.operation: shift ,则可以在规范内将其称为:

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

The entire spec cannot be sent as a flowfile attribute, at least as of now. 至少到现在为止,整个规范无法作为流文件属性发送。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM