Our NiFi version is 1.7. Is there an approach you can suggest for that version, Matt?
On Wed, Dec 4, 2019 at 6:24 PM Matt Burgess <[email protected]> wrote: > Jim, > > As of NiFi 1.8.0 [1], you should be able to do this with > UpdateAttribute -> DuplicateFlowFile -> UpdateAttribute pattern, the > first getting the number of values in the list via the count() EL > function, the second using that (minus 1) to generate duplicates, each > with a copy.index attribute set. That attribute can be used in another > UpdateAttribute with getDelimitedField() EL function for each flow > file to get its own value from FNAME. You may need to rename some of > the attributes to fragment.* in order to use a merge processor, but I > think all the necessary values are covered. Please let me know if this > works for you or not, I added various improvements in order to support > use cases like this, but if I missed something I can certainly add it. > > Regards, > Matt > > [1] https://issues.apache.org/jira/browse/NIFI-5454 > > On Wed, Dec 4, 2019 at 4:54 PM James McMahon <[email protected]> wrote: > > > > I have a series of attributes that result from an EvaluateJSonPath. One > of those attributes, FNAME, appears to be a list of values like so: > [“A”,”B”,”C”]. I want to split my flow file into one for each list element. > I need my results to have the original content, all the original > attributes, and its value for the split result out of the list as a new > attribute. I need to also know the split count, and be able to later merge > my flow files after evaluating the results of the split. > > How can I accomplish this? > > Thanks very much in advance. >
