cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify if there are no files in the source when using Multi file Reader Snap

arvindnsn
Contributor

Hello,

  I am using the Multi file Reader Snap to copy the files from a SFTP source location and write into a Storage blob container.

The process is to run every 30 mins to pick any file(s) that are available and write into a storage blob. There could be scenario where file may not be available in the source SFTP folder and in that case, the pipeline exits without any message.

What is the best way to capture if file is not available in the source SFTP folder.

In the below screenshot, the multifile reader snap is highlighted where the pipeline exits without any notification if there are no files in the source SFTP.

arvindnsn_0-1721098504550.png

Thanks

Aravind N

 

 

 

1 ACCEPTED SOLUTION

ljupcho_machko1
New Contributor III

@arvindnsn, you can also try to use the below approach, where first you will use Directory browser snap (with selected option Ignore empty result), to check if there are source files created. After that you will use the Gate snap with unselected option "ignore empty string" and after the Gate snap you will have Router snap, that will orchestrate the flow, based on that is there any source file(s) present or not. If the files are there you will trigger MultiFile reader snap, otherwise, you will send email notification - no files.

 

ljupcho_machko1_0-1721653398309.png

 

View solution in original post

4 REPLIES 4

hcherukuri
Employee
Employee

hcherukuri_1-1721638211453.png

Hope this helps.

Thanks @hcherukuri for the solution. I was trying for an approach that would find if the file exists even before the process reaches the File Writer Snap. As mentioned in the other post, I was able to use the Gate Snap that basically would help attain that approach. Thanks again for your solution.

ljupcho_machko1
New Contributor III

@arvindnsn, you can also try to use the below approach, where first you will use Directory browser snap (with selected option Ignore empty result), to check if there are source files created. After that you will use the Gate snap with unselected option "ignore empty string" and after the Gate snap you will have Router snap, that will orchestrate the flow, based on that is there any source file(s) present or not. If the files are there you will trigger MultiFile reader snap, otherwise, you will send email notification - no files.

 

ljupcho_machko1_0-1721653398309.png

 

@ljupcho_machko1 Thanks for this solution. This seems to be a simple solution using the Gate Snap.