Support Questions

Find answers, ask questions, and share your expertise

Compare attributes of different flowfiles

avatar
Explorer

Hello,

Is it possible to compare the attributes of two different flowfiles and only pass one if the comparisson results matched?

Thank you,

Jon

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Jon Rodriguez Breton

Are you trying to see if all attributes from both FlowFiles match exactly or is their a specific attribute from each FlowFile you want to compare?

My initial thought would be to use the DetectDuplicate processor.

You could write the unique attribute to the DistributedMapCache service.
Then compare new FlowFiles against that stored value and deleted any duplicates.
That way only the first FlowFile would get passed on.

Thanks,

Matt

View solution in original post

10 REPLIES 10

avatar
Explorer

So, I've accomplished the comparisson of two flowfiles. Trying to complicate this a bit more, what about if I have more than two flowfiles to compare? Is there any processor for this? Other option would be to "play" with the DetectDuplicate and create different levels of comparisson... but I don't like it so much thus the DetectDuplicate itself is very clean.

Any idea @Matt Clarke, @Rob ?

Thanks!