File Reader doesn't always return the entire file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2023 07:49 AM
Hello, I have a simple pipeline where the first snap is a File Reader. It should read a ~3.3M file using SFTP. Sometimes it reads the entire file, and other times it partially reads the file. I ran the pipeline twice three minutes apart. The first execution read 1.6M and the second execution read the entire file. Why would this occur, and is there a way to ensure the entire file is read? Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2023 12:51 PM
@plancor - is it possible that the file is still being written when the SnapLogic pipeline starts? Or is the pipeline failing and aborting the read?
There is nothing in the File Reader itself that would stop reading until it hits the end of file marker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2023 01:02 PM
Thank you, Kory. Do you have a suggestion on how to handle this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2023 04:46 AM
@plancor - the simplest solution I've used is to have the job that is writing the file create it using a temporary file name that doesn't match the pattern that SnapLogic is looking for, and rename it when the file is complete. Or if you are using any kind of enterprise scheduling tool, you can make the SnapLogic job dependent on the job creating the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2023 06:59 AM
Hi Kory, the file is always complete before the pipeline starts. The problem is that the File Reader snap does not always read the entire file. In fact, it does not read the whole file most times...yet sometimes it does.