i have a attribute (that produced by a REST service and catched by invokeHTTP processor) in JSON format like this:
test => {"key":"value"}
and then i want to put it in flows JSON content using JOLT processor, my content is something like this:
{
"id": 123,
"user": "foo"
}
and my JOLT specification is this:
[{
"operation": "default",
"spec": {
"interest": "${test}"
}
}]
the problem is here that, in JOLT advanced window with test attribute nifi cannot put json object and shown this error:
"Error occurred during transformation"
and when run processor this detailed error is become alerted:
"unable to unmarshal json to an object"
my desired result is this:
{
"id": 123,
"user": "foo",
"interest": {"key":"value"}
}
another possible question is... am i choose right solution to overcome this situation? i have a flow that contain JSON content and with invokeHTTP that sent to a REST service and then response store in attribute and then with JOLT processor i combine those together (previous JSON and new JSON in attribute)
