How to read csv lines chunked by id-column with Spring-Batch?
I'm using Spring-Batch to read a csv file, format the content and write it to a database like: StepBuilder<T, T> builder = stepBuilderFactory.get("step") .<T, T>chunk(100) .reader(flatFileItemReader) .processor(processor) .writer(jpaItemWriter); The csv contains an ID column. How can I modify the reader to base the chunks on that ID? Examle: #id, #value 1, first 1000, second 1001, second 1005, second In this case the chunk would only read the first line, then commit, and then continue. Is that possible to apply chunking by a value in the file? I did the same using a custom CompletionPolicy and