Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

issue merging content in nifi

avatar
Expert Contributor

Hi,

I'm having trouble manipulating flow file content in nifi : i have a flow file which contains a json. I use one of the field of this json to make a http request, up to this point everything works fine. I would like to merge the answer of this request with my original json. The merge content processor doesn't seem appropriate so i'm kinda stuck.

Thank you in advance.

1 ACCEPTED SOLUTION

avatar
Master Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
5 REPLIES 5

avatar
Master Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Contributor

Hi,

Can i know how you will write Nifi expression language for 5 fields of json that values coming from another processor.Suppose i have 40 fields in json and 25 having values but 15 fields does not have values/empty fields to it. But i will get the values for 15 fields from another processor and i want to append the values to the 15 empty fields of current json content. Please can you tell me the procedure to do it.

sample json file { "index": 1,

"index_start_at": 56,

"integer": 31,

"float": 11.8891,

"name": "Kyle",

"surname": "Ritchie",

"fullname": "Maria Kelley",

"email": "",

"bool": "" },

where email and bool fields are emptry/null , i want to add values from another processor.

How we achive it ..any steps and screenshots would be great .

avatar
Expert Contributor

a bit more information : to make my http request, i used routeOnAttribute --> InvokeHttp which works fine

avatar
Expert Contributor

@mclark

Thank you very much. Just to complete a bit your answer for those as new to nifi as i am :

- the invokeHttp processor must send the "original" to replaceText

- assuming the "Put Response Body in Attribute" property has been set to "Plouf"; the "Replacement Value" property in replaceText must be set to "${Plouf}"

avatar
Master Mentor

@Lubin Lemarchand you are correct. Thank you for filling in the details.