0
votes

I am working on Spring Boot + Spring Batch example. Where I want to read data (Employee Data) from Oracle Datasource and Department Data from CSV and load it into MongoDB as Employee schema holds embeeded Department details.

I am not getting sure if AnstractItemStreamItemReader is the good choice ?

1

1 Answers

0
votes

An item reader is designed to read from a single source. You can't read from two sources at the same time, unless you are ready to write a custom reader. What you can do is create a staging table where you load the content of the file, then join data between employee/department tables and write the result in MongoDB.

A similar question but for two files here: Combine rows from 2 files and write to DB using Spring Batch.