From the course: Spring: Spring Batch
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Reading flat files
- [Instructor] Batch jobs commonly process, or produce flat files, as part of their logic, so it's no surprise we find support for them out of the box in Spring Batch. In this lesson we'll read a flat file delimited in CSV format using Spring Batch's flat file item reader. We'll build a job that processes orders for a fictional company, H Plus Sport. You'll find the shipped_orders.csv file within a data directory included within the working files for the course. If we take a look at this CSV file we'll see that it contains orders for the H Plus Sport company. H Plus Sport sells different items related to sports and nutrition that customers are able to purchase on their online store. In our CSV file we've depicted these different orders. A couple things to note. First, you'll notice this CSV file has headers that correspond with the data found in each column. And then within the rows of the file we find the different…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.