Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a scenario to create a talend job as below:
From source I am getting multiple numeric value (hours) for same business key in one flow.
I need to compare with existing data and add all values present for that key.
In output for numeric hour value, I want to add all hours for same business key and other column needs to be of the latest data which can be checked from last_update_date.
Input 1:(pk: id,name)
id;name;hours;dept;last_update_date
1;johnny;6.5;AI;05-03-2021
1;johnny;-6;ML;04-03-2021
1;johnny;7;CE;03-03-2021
2;mehuli;7;AI;03-03-2021
Input 2:(pk: id,name)
id;name;hours
1;johnny;1.5;CE;02-03-2021
2;mehuli;5;ML;02-03-2021
3;antony;18;CE;02-03-2021
Output:
id;name;hours;dept;last_update_date
1;johnny;9;AI;05-03-2021 -- as (6.5+(-6)+7+1.5)=9
2;mehuli;12;AI;03-03-2021 -- as (7+5)=12
3;antony;18;CE;02-03-2021
Thanks and best regards,
@Jash tech , you do full outer join using tMaps and then use tAggregate component and do group by id and do sum on hours.
Thanks,
Manohar