Support Questions

Find answers, ask questions, and share your expertise

NIFI : Processor "Auto Terminate RelationShips

avatar
Rising Star

Hi all,

Someone can explain me about "auto Terminate Relationships" in the processor ?

thanks

1 ACCEPTED SOLUTION

avatar
Master Mentor
@mayki wogno

Every Processor has a well defined job to do. When that job is executed, there are 1 to many possible outcomes. Those outcomes are represented in the form of relationships. As a FlowFile traverses through your dataflow it will be routed to these various relationships. Eventually you will reach the end of you dataflow and the auto-terminate relationship capability gives the user the ability to tell NiFi I am not done with the FlowFile you may get rid of it.

A processor is never coded to ever delete FlowFiles by default. For example, lets assume the last processor in my dataflow is a putSFTP. What this processor actually does when it receives a FlowFile is send a copy of that FlowFiles content to the SFTP destination. Upon confirmed delivery it routes the FlowFile to the "success" relationship. You may choose to send that FlowFile via that "success" relationship on for further processing in additional processors or "auto-terminate" it within the putSFTP thus ending its life as FlowFile. In NiFi it is the dataflow designers job to determine when a FlowFile has reached the end of the dataflow and that is exactly what "auto-terminate relationships" is used for.

Thanks,

Matt

View solution in original post

3 REPLIES 3

avatar

Hi,

If you auto-terminate relationships, it means that flow files that are routed to this relationship will be purely deleted. This is often used on endpoint processors of your workflow.

Hope this helps.

avatar
Master Mentor
@mayki wogno

Every Processor has a well defined job to do. When that job is executed, there are 1 to many possible outcomes. Those outcomes are represented in the form of relationships. As a FlowFile traverses through your dataflow it will be routed to these various relationships. Eventually you will reach the end of you dataflow and the auto-terminate relationship capability gives the user the ability to tell NiFi I am not done with the FlowFile you may get rid of it.

A processor is never coded to ever delete FlowFiles by default. For example, lets assume the last processor in my dataflow is a putSFTP. What this processor actually does when it receives a FlowFile is send a copy of that FlowFiles content to the SFTP destination. Upon confirmed delivery it routes the FlowFile to the "success" relationship. You may choose to send that FlowFile via that "success" relationship on for further processing in additional processors or "auto-terminate" it within the putSFTP thus ending its life as FlowFile. In NiFi it is the dataflow designers job to determine when a FlowFile has reached the end of the dataflow and that is exactly what "auto-terminate relationships" is used for.

Thanks,

Matt

avatar
Rising Star

@mclark Thanks !