Support Questions

Find answers, ask questions, and share your expertise

How to compare two attribute value from different flow file in Apache NIFI?

avatar
Contributor

Hello,

I have a two flow, from every flow get one flow file.

May be there some delay between getting file from different flow

How to compare one flow file attribute with other flow file attribute.

After that send mail depending on success or failure condition

Is there any easy way to do that in Apache NIFI.

Thanks in advance.

1 REPLY 1

avatar
Master Guru
@Mitthu Wagh

We can use Wait-Notify processors to wait for 2 Target Signal Count then wait processor releases the flowfile once target signal count number reaches to 2.

Refer to this link for usage/configuring wait/notify processors.

Another way is by using MergeContent processor with correlation attribute name and Minimum number of entries as 2 then processor will wait for 2 flowfiles with the same attribute name then merges the flowfiles and then send mail based on that.

Refer to this and this links for same use case with mergecontent processor.

-

If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.