Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Send the last CSV file from a NiFi flow to a separate processor

avatar
New Contributor

Hello!

I have a flow that extracts 100 CSV files from a SFTP sever. 

I need to identify the last CSV file in order to continue the flow after all the files are loaded in GCP bucket.

So, let me explain my scenario: I am extracting all 100 files from SFTP and load them in a GCP bucket. However, after the files are loaded, I want to redirect one file (preferably the last one) using the RouteOnAttribute in order to continue the flow for executing another processors.

Can someone help me please?

3 REPLIES 3

avatar
Community Manager

@Mazilinho Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our NiFi experts @mburgess @joseomjr  who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
New Contributor

Thank you, Diana!  Another way to achieve this is to combine all flow files into one, but using MergeContent processor will not work, because Defragment option will fail, and the Bin-Packing option will merge all the flow-files into multiple files, and not only into one.

avatar

So how are you determining the last file? Based on what? is a file  created\updated date? or is it based on some sort order?