Jeng
Jeng

Reputation: 1

Apache Nifi, can I collect an attribute from multiple flow files

I have a nifi flow that takes in .csv files and partitions each into multiple records with each csv column value added as an attribute.

At one point in the flow, I'd like to collect the value of one attribute from each record that passes though. There could be from 0 to n collected. Once I have the list, it'll be emailed out. I'm trying to avoid me (or someone else) getting bombed with emails if there are 200+ bad records in a file. So if I could collect for a fixed period of time or until another attribute (filename) changes, that would be great.

I've tried merge content and record. I even tried replace text to replace the content w/ just the attribute value I want to save and merging those, and a slew of other things.

Is there a simple way to do this in nifi?

Upvotes: 0

Views: 708

Answers (1)

Vijay Kumar
Vijay Kumar

Reputation: 2717

Have you tried UpdateAttribute with a new attribute of type array. When each flowfile passes the this processor you could continue to update the value of this attribute by appending a new value to the array, attribute.

However, as @daggett pointed out, it will be helpful if you can provide the input and expected output.

Upvotes: 1

Related Questions