Announcement Announcement Module
Collapse
No announcement yet.
Implemeting a CustomItemReader / help Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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

    Comment

    Working...
    X