-
Mar 4th, 2011, 03:58 AM
#1
FlatFileItemReader and how to skip empty files
How do I configure the FlatFileItemReader to skip empty files and if possible create a log entry about the emtpy file?
-
Mar 4th, 2011, 06:20 PM
#2
By default, the FileItemReader will return null signaling that the step is complete when it encounters an empty file (assuming that the file exists. If it doesn't, we're talking about a different scenario). In this case you could create a StepListener that checks the number of records read in. If it is zero, you can then perform whatever logic you want there.
Let me know if you need more details.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules