Created 08-30-2023 11:39 PM
I'm working on a data processing flow using Apache NiFi, and I have a scenario that I'd like some guidance on.
I have an Execute SQL script that retrieves data from a table in a SQL Server. Among the data returned, I have source and target folder paths.
My goal is to loop through each of these source folder paths. For each folder, if there are any files present, I need to:
I'm currently using NiFi, and I'm wondering what processors and strategies I should consider to achieve this workflow efficiently. Any insights, recommendations, or examples of similar workflows would be greatly appreciated.
Thank you in advance for your help!
Created 08-31-2023 03:26 PM
Hi @RRG ,
The below example can give you an idea of what processors you might need to use to achieve what you are looking for. You might adjust processors as needed.
Feel free to let me know if you have any questions.
If that helps please accept solution.
Thanks
Created 08-31-2023 02:28 AM
@RRG, Welcome to our community! To help you get the best possible answer, I have tagged in our NiFi experts @SAMSAL @ckumar @MattWho @steven-matison who may be able to assist you further.
Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.
Regards,
Vidya Sargur,Created 08-31-2023 03:26 PM
Hi @RRG ,
The below example can give you an idea of what processors you might need to use to achieve what you are looking for. You might adjust processors as needed.
Feel free to let me know if you have any questions.
If that helps please accept solution.
Thanks
Created 08-01-2024 02:59 AM
how to download this template? thanks.
Created on 09-28-2023 01:47 PM - edited 09-28-2023 01:48 PM
@SAMSAL @VidyaSargur
When using the ExtractText processor, I'm encountering an issue where it returns matched data with file names like 'README,' 'NOTICE,' and 'LICENSE.'
I've noticed that even if there are no files in the source folder, running the package results in records being inserted into the database with these 'README,' 'NOTICE,' and 'LICENSE' file names.
Is there a way to prevent this behavior, so that only actual files in the source folder are processed and inserted into the database?
Created on 09-28-2023 07:32 PM - edited 09-28-2023 07:33 PM
@RRG,
In the ExtractText you can use the following pattern to get only valid files:
(^((?!README|LICENSE|NOTICE).)*$)
This pattern will exclude any text containing readme, license or notice in it.
Hope that helps.
Created 09-28-2023 11:03 PM
Thank you!
If I can receive the real file name that includes this text?
Created 09-29-2023 06:14 AM
@RRG,
Not sure I understand. Can you please elaborate?