Chris, Are you looking to have a flow file that has its own content also as an attribute? With EvaluateJsonPath, are you taking in the entire document? If so, you could use ExtractText with a regex that captures all text and puts it in an attribute, I believe the content of the flow file is untouched.
Please let me know if I've misunderstood your use case, I'm a little confused as to why you have two paths and step 3. Wouldn't #1 and #2 (with "flowfile-attribute" as the Destination) read the file into an attribute and also keep it in the content? Regards, Matt On Wed, Aug 24, 2016 at 4:33 PM, McDermott, Chris Kevin (MSDU - STaTS/StorefrontRemote) <[email protected]> wrote: > Hi folks, > > > > I’m looking for some ideas here. I need to read the content of a small > local file info a flow file attribute. I can’t find a processor that does > this. Did I miss one that does? > > > > So without one of these I’ve been trying to do this using a MergeContent > processor. > > > > First, I assign a correlation UUID and store it in an attribute > > > > I split by file down two processing paths. The left hand path goes > straight to the MergeContentProcessors. > > > > In the right hand path I > > 1. Read the content of the local file using FetchFile > > 2. Pull the content of the FlowFile into an attribute using > EvaluateJSONPath > > 3. Clear the content of the FlowFile using ReplaceText > > > > Then I combine the left and right legs using MergeContent using the > assigned correlation UUID to merge the files. > > > > This generally works, except when it doesn’t. J > > > > The problem seems to be that the left hand side of the stream flows > relatively faster than the right hand path, which makes sense. This can > lead to the “bins” in the MergeContent processor being reused before the > file in the bin can be merged with the file traveling down the right hand > path causing Uncorrelated files are then sent to the merged output. > > > > Does it sound like I am using the MergeContent processor in the right way? > > > > Any other ideas? > > > > > > Thanks in advance, > > > > Chris McDermott > > > > Remote Business Analytics > > STaTS/StoreFront Remote > > HPE Storage > > Hewlett Packard Enterprise > > Mobile: +1 978-697-5315 > > > >
