开发者

Talend: Aggregation summary?

开发者 https://www.devze.com 2023-03-09 07:40 出处:网络
I\'ve seen how to use tMap in TOS to map different fields in a SQL-like JOIN. How do I aggregate b开发者_开发百科ased on certain fields?

I've seen how to use tMap in TOS to map different fields in a SQL-like JOIN. How do I aggregate b开发者_开发百科ased on certain fields?

If I have two tables:

[ A, B, C, D ]
and               that are tMap'ped to  [ B, C, F, G ]
[ B, E, F, G] 

how can I aggregate the results to that instead of the many entries of the non-unique B I can see something like:

[ B, count(B), avg(C), avg(F), avg(G) ]

Thanks!


You certainly can. Use the tAggregate component to do that. You can group by column B and then compute all of the different aggregations, like count, sum, and average in the other columns.

0

精彩评论

暂无评论...
验证码 换一张
取 消