Custom ItemReader to return more than one rows[based on some column value] to ItemProcessor

筅森魡賤 提交于 2019-12-02 18:11:56

问题


I have a file with multiple rows. I need to read more than one rows based on some column value and pass it to Processor as List.

Sample Input file is:

2|joe|24|CA
2|sam|32|MA
2|joe|44|CA
3|amy|21|CA

The file is sorted based on first field.

I wanted to pass first three rows to processor as List<item> then last row as separate List<item>

Is it something we can do with CustomItemReader?

Regards, Shankar

来源:https://stackoverflow.com/questions/31832341/custom-itemreader-to-return-more-than-one-rowsbased-on-some-column-value-to-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!