How can I work with response in NIFI
hi i have such a problem, i have a flow that downloads a csv file with data and there are columns like:,system name, surname, phone, mail, card name, proffesion. The file looks like this only data is more of course
| system | name | surname | phone | proffesion | department | |
| ABA | John | Wane | 77777777 | j.wane@gmail.com | accountant | accountancy |
| BCA | Lilly | Black | 89898989 | l.black@gmail.com | recruiter | hr |
I am reading this file record by record and for each record
I need to query another system via REST using first name, last name, profession and department, the query looks something like this:
https://system address/data/?name=${name}&surname=${surname}&proffesion=${proffesion}&department=${department}
I use Invoke HTTP for this
and now this system should return me json with data:
{
"date": [
{
"name": "John",
"surname": "Wane",
"profession": "ACC",
"department":"ACC01"
}
}
As you can see in the answer I get a different profession and department. How can I now create a json for each record that will contain data from the csv file, i.e. system, name, surname, phone mail, but proffesion and department will take the response from the second system that came with jason? So that I have the following result:
{
"system": "ABA",(data from csv)
"phone": 7777777,(data from csv)
"mail": "j.wane@gmail.com" (data from csv)
"name": "John", (data from csv)
"surname": "Wane", (data from csv)
"profession": "ACC", (data from json response from other system)
"department":"ACC01" (data from json from other system)
}
In a word, how can I combine the data from the input csv file with the data coming from the response from another system?

