AnsweredAssumed Answered

GROOVY script to add hours for same date and id received from a pipelined delimited file

Question asked by spaty148449 on Dec 11, 2017
Latest reply on May 21, 2018 by gopinath.elangovan199316

Hi ,

I would need to write a GROOVY script to add hours for same date and id received from a pipelined delimited file and replace in the file.

For example

Below is the input

E-00028257|26/10/2017|5.4
E-00028257|26/10/2017|2
E-00028257|26/10/2017|0.3
E-00028257|27/10/2017|5.5
E-00028257|27/10/2017|2
E-00028257|27/10/2017|0.3
E-00028257|30/10/2017|5.6
E-00028257|30/10/2017|2
E-00028257|30/10/2017|0.3

My expected output:

E-00028257|26/10/2017|7.5
E-00028257|27/10/2017|7.8
E-00028257|30/10/2017|7.9

Can anyone pls help me on this ?

Outcomes