I have a very large csv file, that makes my Job run into 30 min. My data comes from purecloud. I need to write it in three diferents periods depending on the value of the time field (2021-03-10T11:44:01.781Z) : 00-10, 10-14 , 14-23 hours.
Here is one row in the file:
b1df888d-bebe-4a0b-a44a-0b891c660586;tAlert;205;2021-03-10T11:44:01.781Z
I run with a tasklet chunk like this :
<step id="step1">
<tasklet>
<chunk reader="itemReader" writer="testCompositeWriter"
commit-interval="1">
</chunk>
</tasklet>
</step>
and in the reader I am doing something like this:
fecha = obtenerFechaFin(i).split("T"); //2021-03-07T07:19:18.051Z string DATE
horas = fecha[1]; //07:19:18.051Z string HOURS
horaIntervalo = horas.split(":");
hora = horaIntervalo[0]; //07 string
horaInt = Integer.parseInt(hora); //07 int HOUR
if (horaInt >= 00 && horaInt < 10){
lisConversationOutBackup.addAll(generarSalida(conversationsOut.getConversations()));
}
if (horaInt >= 10 && horaInt < 14){
}
if (horaInt >= 14 && horaInt < 23){
}
can "commit-interval" or any other sentence make this?