Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
In talend, there is a tAggregateRow component with which you can do all the aggregate process and the get first value. If you have trouble to use this component, please show us an example and what are your expected result, I can show you a demo job.
Best regards
Shong
if (input_row.shop==null) {
output_row.shop = (String)globalMap.get("PreviousShop");
} else {
output_row.shop=input_row.shop;
globalMap.put("PreviousShop",input_row.shop);
}
output_row.value1=input_row.value1;
output_row.value2=input_row.value2;
Between your input component and tAggregateRow have a tJavaRow with the following: if (input_row.shop==null) {
output_row.shop = (String)globalMap.get("PreviousShop");
} else {
output_row.shop=input_row.shop;
globalMap.put("PreviousShop",input_row.shop);
}
output_row.value1=input_row.value1;
output_row.value2=input_row.value2;