Forum Discussion

arvindnsn's avatar
arvindnsn
Contributor
2 years ago
Solved

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

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.

Thanks

Aravind N

 

 

 

  • 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.

     

     

4 Replies

  • ljupcho_machko1's avatar
    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.

     

     

    • arvindnsn's avatar
      arvindnsn
      Contributor

      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.