Need to take an attribute from the flow files, & add it into the JSON content of the file.

There is flow that creates some new attributes / content. we need to take an attribute from the flow files, and add it into the JSON content of the file.
we can use AttributesToJSON, but that just overwrites the file content.
The UpdateAttribute adds current time to the attribute list, and then the AttributestoJSON adds an attribute to the actual JSON, but it also overwrites the entire flow file content. we have tried to remedy this with MergeRecord, but can't the two files to merge back together (using CurrentTime as a Correlation Attribute Name).

Is ther any way to accomplish this? The MergeRecord just comes up with an error. (Also not sure how to configure the RecordReader/Writer, because I want to keep everything in JSON).

Tagged:
Sign In or Register to comment.