Support Questions

Find answers, ask questions, and share your expertise

How to Join 2 Processor JoinEnrichment

avatar
Explorer

Hello Folks,

I'd like to looking for your help on this.

I seeking your guidance regarding how to join 2 JoinEnrichment Processors.

Please help!!

1 ACCEPTED SOLUTION

avatar
Master Mentor

@HoangNguyen 

All the ForkEnrichment processor does is add two specific FlowFile Attributes to each FlowFile it outputs:

MattWho_0-1751469891673.png

The JoinEnrichment processor depends on receiving two FlowFiles with Matching "enrichment.group.ids" and one with "enrichment.role" = ORIGINAL and other FlowFile with "enrichment.id" = ENRICHMENT.  


So you can do something like this for example:

MattWho_1-1751470087060.png

In the above you above you fork the staring FlowFile and then join that first Enrichment, then you use ForkEnrichment again to generate the needed FlowFile attributes for the second Join enrichment operation.

Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

 



View solution in original post

3 REPLIES 3

avatar
Master Mentor

@HoangNguyen 

Welcome to the community.

It would be very difficult to provide any suggestions with the limited information you have shared.  Please share more detail about your use case and what you are trying to accomplish.   The JoinEnrichment processor is used in conjunction with the ForkEnrichment processor.  For a JoinEnrichment processor to join two NiFi  FlowFiles, those two FlowFiles must both have a matching group id set in an "enrichment.group.id" attribute on each FlowFile and must also have an Attribute" enrichment.role" set appropriately on each FlowFile (ORIGINAL set on FlowFile to be enriched and ENRICHMENT set on the FlowFile containing the enrichment data). 

Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

avatar
Explorer

 

Hello @MattWho,

Thank you for your prompt reply.

I would like to create a NiFi chart structured as follows, as I am unable to attach a screenshot due to limitations:

```
ExecuteSQL
-> QueryRecord
-> ForkEnrichment
    -> (original) JoinEnrichment-1
    -> (enrichment) ExecuteSQL
    -> (original) JoinEnrichment-2
    -> (enrichment) ExecuteSQL
```

I am looking to join JoinEnrichment-1 and JoinEnrichment-2. Could you please advise if there is a way to achieve this? I would greatly appreciate your support.

 

 

avatar
Master Mentor

@HoangNguyen 

All the ForkEnrichment processor does is add two specific FlowFile Attributes to each FlowFile it outputs:

MattWho_0-1751469891673.png

The JoinEnrichment processor depends on receiving two FlowFiles with Matching "enrichment.group.ids" and one with "enrichment.role" = ORIGINAL and other FlowFile with "enrichment.id" = ENRICHMENT.  


So you can do something like this for example:

MattWho_1-1751470087060.png

In the above you above you fork the staring FlowFile and then join that first Enrichment, then you use ForkEnrichment again to generate the needed FlowFile attributes for the second Join enrichment operation.

Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt