• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple Resource Files for Job Execution in Spring Batch

 
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have requirement to process a flatfile through spring batch job execution. I get the list of files from the folder which needs to be processed. Please let me know how to accomplish this.

For example: I have player.csv and player1.csv and player2.csv in a folder. I have these file names in a list. Please let me know if I can input all these files names for Jobparameters so that I can execute a single Job?

 
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Please let me know if I can input all these files names for Jobparameters


Yep sure you can. You just need to pass in more comma separated parameters. You are already passing in two parameters in the example you've given

so that I can execute a single Job?


That would depend on how you write the job, what its supposed to be doing etc. Without more information, its hard to answer this question.
 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am reading csv files using flatfilereader. I want to read list of files from folder and pass filenames for job to execute and put it in mapper files.
 
Saifuddin Merchant
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check this section out, seems to fit what you are looking for

http://static.springsource.org/spring-batch/reference/html-single/index.html#multiFileInput
 
reply
    Bookmark Topic Watch Topic
  • New Topic