I have experience with Spring, but new to Spring Batch. Now I have a task to transfer the data structure from a simple structure in one database to a complex one in another. The data structure corresponds to the hierarchy of objects, which I will call as
OldParent 1 --> n OldChild
NewParent 1 --> n NewChild
In the old db in the new system there are only two tables, everything becomes much more complicated and there are 8 tables, but at the moment it does not matter.
Basically, I would like to use a simple JDBC based solution with row metrics from OldParent and conversion to NewParent.
So, here will be the basic fragment of the configuration:
<batch:job id="migration">
<batch:step id="convertLegacyData">
<batch:tasklet>
<batch:chunk
reader="parentReader"
writer="parentWriter"
commit-interval="200" />
</batch:tasklet>
</batch:step>
</batch:job>
In this case, parentReader will acquire and transform OldChild objects, possibly delegating childReader / childWriter objects.
: , , , .
, :
<batch:job id="migration">
<batch:step id="convertLegacyData">
<batch:tasklet>
<batch:chunk
reader="childReader"
writer="childWriter"
commit-interval="200" />
</batch:tasklet>
</batch:step>
</batch:job>
childReader OldParent NewParents, parentWriter. , OldParents, OldChild.
OldParent -> NewParent OldChild -> NewChild. ( , OldParent NewParent, , commit-interval.
? ?