-
Nov 15th, 2011, 02:44 AM
#1
Implemeting a CustomItemReader / help
hello all
i have this particular usecase that i need to implement using spring batch.
I Have to export a set of data to a file.
THe data that i need to export will come from a database, but need to be retrieved using a custom java bean. IN addition, the data retrieval process is not straightforward.
Here is how it goes:
1 - extract columnX and columnY from MyTable (this can return n rows)
2 - for each of the column extracted at 1), call MyService.query(x, y) to retrieve the data that will be exported
I am guessing that operation 1 and 2 will be done in two separate steps, but how can i pass the data between step 1 and step 2?
operation in step2 looks like a custom ItemReader (or ItemProcessor)....which needs to be invoked for every item retrieved at 1.
could anyone guide me on how to implement my batch correctly?
w/kindest regards
marco
-
Nov 15th, 2011, 06:29 AM
#2
Hi
ok i thought about it, and i believe with a jdbcItemREader (which select data from db), an ItemProcessor (which queries my service) and an ItemWriter should do it
sorry for bothering
rgds
marco
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