I am new in NiFI. I have below nested xml file and I need to keep the parents node <track id> with its multiple record <switch id> in a same flow file. I already able to separate them but not able to keep them in a same flow file attributes record.
So, it will be highly appreciated if anyone please help me how can I Include parent fields <track id> into the output record <switch> and what will be my flow file?
XML Looks like:
My flow file looks like:
My expected output:
flow-file attributes should be:
So that I can write table into database using PutSQL as below: