append an attribute to flowfile content at the end
Hi All,
I am using putdatabaserecord to store a value into DB.
Now i have a flow based on failure link to (this processor), that this failed record will be stored in disc for troubleshooting.
I can store the failed record in disc by using putfile processor.
Now i wanted it more informative during debugging, as the attribute "putdatabaserecord.error" contains the error reason, i want to append the flowfile content with this error reason.
I tried to acheive this using below flow..
putsql/putdbrecord -> failure-> updateattribute (this is to give the flowfile a realistic name)-> attributesToJson (destination flowfileattribute/content -> putfile

but in attributestoJson , if the destination is kept as flowfileattribute, the flowfile dont get this attribute or if it is kept as flowfile content, original flowfile content is replaced...
My requirement is to append this single attribute to the existing flowfile content.
Any help or suggestion is greatly appreciated.

