Median in tAggregateRow

One Star

Median in tAggregateRow

Hello!
Is there a way to get the Median in tAggregateRow?
I couldn't find a way Smiley Sad
thx
Seven Stars

Re: Median in tAggregateRow

I suggest you add a new feature request on the BugTracker or add it to this one.
One Star

Re: Median in tAggregateRow

Okay. I'll try to get a change.
But I think there must be a way to get the median in a different way..
Please help - I don't have any ideas Smiley Sad
Thanks!
Seven Stars

Re: Median in tAggregateRow

I can't think of a nice one but you could first sort your data then generate a sequence number for each row (use Numeric.sequence("sequencename",1,1)) and temporarily store the flow (using tFileOutput or tHashOutput). Then read back the stored rows to retrieve the value from the count/2 row (either read only that many rows and then use the last function in tAggregateRow or use a tJavaRow to store the value only when the sequence number equals count/2; get the count from the NB_LINE globalMap variable of your output component).

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download