Calculate average, count and standard deviation with tMap

Six Stars

Calculate average, count and standard deviation with tMap

Hello,

 

Is there any way to calculate the average, standard deviation and count data of some columns?

 

I know that it is possible to do it with tggregateRow, but I need to use the results of these values (average, standard deviation and count ) ​​in a tMap to perform other calculations with them, so I would like to simplify everything in a single component (tMap).

This in my input information (the columns comes from an operation in a tAggregateRow component):1.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I need to calculate (as variables in tMap) the average and standard deviation of columns 'Frecuencia' and 'Repeticion' and count how many different data there's in column 'name'.

Then I need to do some others operations (like multiplications, divisions, square root, addition, subtraction and others) between this results and those two columns.

 

It is possible? Somebody please say yes.

 

Thanks!!


Accepted Solutions
Highlighted
Employee

Re: Calculate average, count and standard deviation with tMap

Hi,

 

    My suggestion would be to do the aggregation operations using taggregaterow component itself and store the output data to a thashoutput.

 

    Then use the data from hash by reading it again using thashinput and join with main data in tmap for downstream calculations. It will be easy and less time consuming method.

 

    I would suggest you to try based on this method and if you are stuck somewhere, please feel free to comeback with job and component screenshots. We are always here to help you :-)

 

Warm Regards,

 

Nikhil Thampi

View solution in original post


All Replies
Highlighted
Employee

Re: Calculate average, count and standard deviation with tMap

Hi,

 

    My suggestion would be to do the aggregation operations using taggregaterow component itself and store the output data to a thashoutput.

 

    Then use the data from hash by reading it again using thashinput and join with main data in tmap for downstream calculations. It will be easy and less time consuming method.

 

    I would suggest you to try based on this method and if you are stuck somewhere, please feel free to comeback with job and component screenshots. We are always here to help you :-)

 

Warm Regards,

 

Nikhil Thampi

View solution in original post

Highlighted
Six Stars

Re: Calculate average, count and standard deviation with tMap

Thank you VERY much Nikhil, you have been SO helpful.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog