I have requirement where reader being is used to convert a file to a composite object, I need to take different objects inside that object and write it as separate json file. That means for single line of csv file, there will be multiple jsons files created and that needs to be written to Marklogic database. I have used multiple item writer to convert a file to single output file, but now I need to split each line to multiple line and write same to marklogic database. Any idea how single line can be split to multiple files and written to Marklogic database.
example of composite object created out of Item reader, below is just an example not the actual issue scenario:
Person{
HomeAddress homeadd;
OfficeAddress officeAdd;
}
A single line of csv represents home add and office add. I need in output two json files/objects (one for each type of add) written to Marklogic database. Thanks