Support Questions

Find answers, ask questions, and share your expertise

Need help on a logic using NiFi.

avatar
Contributor

Team,

I am getting the below files in a directory in the same order, companies.dat data.xml transaction.dat accounts.dat bankdetails.dat

I use a List File processor to read the files from a directory. When we encounter ".xml" file, it should trigger a shell script & rest of the files (transaction.dat, accounts.dat & bankdetails.dat) should not be processed until script completes its execution. Once the script is complete, the rest of flow files should be processed.

If .dat file then process the file(Path A). If .xml file, then trigger the script(Path B) & then process the rest of the .dat files(Path A).

Could you please help us with an approach?

Please let me know if more info is required.

Thanks!

1 ACCEPTED SOLUTION

avatar
Super Collaborator

may be a two step approach should be used. in the first list file, just look for .xml files, and then when you have executed the script for xml, trigger another list for *.dat files .

View solution in original post

2 REPLIES 2

avatar
Super Collaborator

may be a two step approach should be used. in the first list file, just look for .xml files, and then when you have executed the script for xml, trigger another list for *.dat files .

avatar
Master Guru

Step 1: List XML files

Step 2: Execute Script

Step 3: On Success, List Data Files

Step 4: Process those files

I have done that with some things, works fine.