I’m new to Spring Batch and trying to get some guidance for below requirement.
Overall Requirement:
I’ve to get data from different systems, apply some business logic, save the result in DB.
Below is an example.
I need to read data from 3 CSV files.
First file – person.csv – contains name and id
Second File – address.csv – contains address info for each person. One person can have zero or multiple addresses.
Third File – employment.csv – contains employment info for each person. One person can have zero or multiple employers.
Here is some sample.
Person.csv### (total size is 8 millions)
"personID", "personName"
1, Joey
2, Chandler
3, Ross
4, Monica
Address.csv
"personID", "addressType", "state"
1, residence, NY
1, mailing, NC
2, residence, NY
4, residence, NY
4, mailing, DC
Employment.csv
"personID", "employerName"
1, emp1
2, emp2
2, emp3
3, emp4
Note: each file is sorted by person id.
To apply the business logic, I need to merge the data for each person, i.e, I need to merge person, address, employment data for one person to apply the logic. Can you suggest any approach for this.