PDA

View Full Version : Does Spring Batch Support Multiple I/O files


aslam.shahulhameed
Jul 9th, 2007, 05:31 AM
Hi Dave,

Does spring Batch support multiple I/O files in a single jobRun for a particular scheduleDate.

Scenario:
Read 100 rows from the database and write to file, Output file can have atmost 50 lines(rows). So does spring batch support creating 2 files each containing 50 lines (filename.txt.001 & filename.txt.002).

lucasward
Jul 9th, 2007, 12:23 PM
This is supported, however, there isn't any kind of 'max record count' that would signal to the FileOutputSource that a new file should be created. The outputsource would simply need to be closed and reopened. However, a wrapper could easily be written that would do this for you.

Dave Syer
Jul 9th, 2007, 12:26 PM
http://opensource.atlassian.com/projects/spring/browse/BATCH-34