Member since
04-08-2018
6
Posts
2
Kudos Received
0
Solutions
12-09-2024
11:53 AM
@laurie_mcintosh The Wait/Notify processors have existed a long time in Apache NiFi and are complicated to use correctly. I strongly encourage you to read the following about the Wait/Notify: https://ijokarumawak.github.io/nifi/2017/02/02/nifi-notify-batch/ https://pierrevillard.com/2018/2018-06-27-nifi-workflow-monitoring-wait-notify-pattern-with-split-and-merge/ With advancements in Apache NIFi and depending on your use case, there may be easier ways to handle your use case. Process Group FlowFile Concurrency in conjunction with Process Group Outbound Policy is a newer option that has often been used in place of wait/notify setups. Unrelated... If you are running a NiFi cluster and the target directory is a network mount directory, you should be using the ListFile/FetchFile processors in place of the GetFile. Please help our community thrive. 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 more
04-14-2018
07:40 PM
@Laurie McIntosh If you are having more than one file to process then use Merge Content processor after GetFile processor,Merge Content processor merges more than one file into one file. Flow:- Get File --> MergeContent -->Truncate Table --> insert csv into Table --> clean up by using merge content processor we are processing one file at a time even though you are having more than one file. PutDatabaseRecord processor(all record based processors) are pretty powerful in NiFi which can handle millions of records. Please refer to below links to know how to configure merge content processor https://community.hortonworks.com/questions/64337/apache-nifi-merge-content.html https://community.hortonworks.com/questions/161827/mergeprocessor-nifi-using-the-correlation-attribut.html https://community.hortonworks.com/questions/149047/nifi-how-to-handle-with-mergecontent-processor.html in addition there are wait and notify processors in NiFi, which Routes incoming FlowFiles to the 'wait' relationship until a matching release signal is stored in the distributed cache from a corresponding Notify processor. When a matching release signal is identified, a waiting FlowFile is routed to the 'success' relationship. http://ijokarumawak.github.io/nifi/2017/02/02/nifi-notify-batch/
... View more