Or, 3?
---------------------> MergeContent
+---------> PutFile
AttributesToJson ----> MergeContent
Or, 4?
Join the ranks of custom processor writers and write one to do
exactly what you want--good idea if this a pretty permanent part of
your roadmap.
Hope this helps.
Russ
On 02/15/2017 03:18 PM, Kiran wrote:
Hello,
Within my NiFi flows for the error scenarios I would really like the
option of outputting the flow file to an error directory (the
outputted file contains the flow file contents and well as the
attributes).
This way once the error has been resolved I can replay the FlowFile by
reading it back in which would read the contents as well as the flow
file attributes.
From looking through the processor list the only way I can see to do
this is by:
1. Using the AttributesToJson to output the attributes and separately
output the flowfile contents. Then read both the contents and JSON
file back in and parse the JSON back into attributes.
2. Use a groovy script within the ExecuteScript processor to combine
the attributes and contents together. Then output the results to disk.
When reading it back in use another groovy script to parse the file
and populate the attributes and contents.
My preferred option is number 2.
Can I confirm that I haven't missed anything obvious.
Thanks,
Brian
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon>
Virus-free. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link>