spring batch aggregate records from db as one single record -
is there sample can implement aggregate item reader reads data db , aggregate them 1 record based on col value?
i saw similar sample reads data file , aggregate them not db.
what you're asking driving query pattern of batch processing attempts accomplish. in essence, use itemreader
return main object (that has id want aggregate by). there, use itemprocessor
enrich item querying rest of data id.
you can read more driving query pattern , other batch processing patterns in spring batch documentation here: http://docs.spring.io/spring-batch/trunk/reference/html/patterns.html
Comments
Post a Comment