Created 04-10-2024 04:08 AM
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?
Created 04-10-2024 09:03 AM
@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,Created 04-11-2024 12:07 AM
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.
Created 04-12-2024 06:25 PM
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?