Four Stars

Make Transformation on a File

Morning All,

I have a file which look like bellow:

Company;User_ID;Matricule;User_Name;Services;Holiday_Type;Days;Satrt_Date;End_Date
VOL;vol_e_borsato;306;BORSATO Estelle;COM C; Sick ; 1.00; 21/06/2017;21/06/2017
VOL;vol_e_borsato;306;BORSATO Estelle;COM C; Sick ; 2.00; 22/06/2017;23/06/2017
VOL;vol_e_borsato;306;BORSATO Estelle;COM C;Recup ; 3.00; 01/06/2017;03/06/2017
VOL;vol_e_borsato;306;BORSATO Estelle;COM C; Sick ; 3.00; 25/06/2017;27/06/2017

FAR;far_k_boufrouh;117;BOUFROUH Karim;LOG C;Wedding ;1.00; 09/06/2017;09/06/2017
FAR;far_k_boufrouh;117;BOUFROUH Karim;LOG C;Wedding ;1.00; 12/06/2017;12/06/2017
FAR;far_k_boufrouh;117;BOUFROUH Karim;LOG C; Recup  ;2.00; 15/06/2017;16/06/2017

SAD;sad_g_broise;19;BROISE Gilles;COM C; School ;1.00; 02/06/2017;02/06/2017
SAD;sad_g_broise;19;BROISE Gilles;COM C; School ;3.00; 03/06/2017;05/06/2017

MOR;mor_e_carvalho;6;CARVALHO Edith;ADM A;Sick; 2.00; 06/06/2017;07/06/2017
MOR;mor_e_carvalho;6;CARVALHO Edith;ADM A;Sick; 1.00; 08/06/2017;09/06/2017
MOR;mor_e_carvalho;6;CARVALHO Edith;ADM A;Sick; 3.00; 10/06/2017;12/06/2017

And i need to unite Rows for the same person identify by (Company,User_ID, User_Name, Services) where "Holiday_Type" are the same and the (End_Date + 1 day) of first Row equal the (End_Date) of the second Row.

 

For instance, i want to get this output:

 

Company;User_ID;Matricule;User_Name;Services;Holiday_Type;Days;Satrt_Date;End_Date
VOL;vol_e_borsato;306;BORSATO Estelle;COM C; Sick ; 3.00; 21/06/2017;23/06/2017
VOL;vol_e_borsato;306;BORSATO Estelle;COM C;Recup ; 3.00; 01/06/2017;03/06/2017
VOL;vol_e_borsato;306;BORSATO Estelle;COM C; Sick ; 3.00; 25/06/2017;27/06/2017

FAR;far_k_boufrouh;117;BOUFROUH Karim;LOG C;Wedding ;1.00; 09/06/2017;09/06/2017
FAR;far_k_boufrouh;117;BOUFROUH Karim;LOG C;Wedding ;1.00; 12/06/2017;12/06/2017
FAR;far_k_boufrouh;117;BOUFROUH Karim;LOG C; Recup  ;2.00; 15/06/2017;16/06/2017

SAD;sad_g_broise;19;BROISE Gilles;COM C; School ;4.00; 02/06/2017;05/06/2017

MOR;mor_e_carvalho;6;CARVALHO Edith;ADM A;Sick; 6.00;  06/06/2017;12/06/2017

Thank you for help,

  • Data Integration
  • Talend Integration Cloud
1 REPLY
Four Stars

Re: Make Transformation on a File

Hi All,

May somebody advice me please