Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Merge Attribute values from FlowFiles

avatar
Expert Contributor

Hello together,

 

I splitted a flow file for each x value.

With value x I fetch value y and set it to the Attribute.


Is it possible if I merge the FlowFiles together, that the Attribute values can be merged comma-seperated too?

1 ACCEPTED SOLUTION

avatar
Super Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
3 REPLIES 3

avatar
Super Mentor

@Faerballert 

 

The NiFi merge based processors only offer the option to "Keep Common Attributes" (keeps on attributes were every merged file has same attributes with same value) or "Keep all Unique Attributes" (same as above, but will also keep attributes that is unique.  This means any attribute that exists in 1 or more of the merged FlowFiles were the value assigned to that attribute is the same in cases where attribute was found on more than one FlowFile being merged).

 

There is no option to merge all attributes creating a comma separated list of unique values.   What is the use case for such a n attribute merge need?  There is no way to tell which value goes with which chunk of the merged data. Plus if the merged FlowFile were later split, every produced split FlowFile would have all the same FlowFile attributes.

Hope this helps,
Matt

avatar
Expert Contributor

thanks @MattWho for your answer.

The goal for me is to create an output with the merged attributes so that I can notify myself what elements have been edited.

 

My thought was to mail me something like this:

Postion 1,2,3,5,8,13 has been changed

*1,2,3,5,8,13 are the attribute values of each flowfile

 

Dont know how i can solve this otherwise in one Flow/Notification

avatar
Super Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login