One Star

tAggregateRow - sum double variables possible?

Hello, quick question to which I couldn't find the answer elsewhere.
Will tAggregateRow's sum function work if I feed it with double values or does it only work with ints?
Thanks in advance
5 REPLIES
Moderator

Re: tAggregateRow - sum double variables possible?

Hi,
The tAggregateRow support for double data type.
To make it more clear, I have made a demo job.
Input:
1.33;4
2.24;4
See my screenshots for details
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tAggregateRow - sum double variables possible?

Okay perfect. Thanks Sabrina
Moderator

Re: tAggregateRow - sum double variables possible?

Hi,
Feel free post your issue on forum.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tAggregateRow - sum double variables possible?

Hi,
I have to calculate average for a field in which it is necessary to ignore null values, I am using the component tAggregateRow and the input is from tMap the field is a String, but i get this message
Warning:the operation 'sum' for the output column 'MV' can't be processed because of incompatible input and/or output types

i tried to change to double but i think this will return unwanted caculations because it will consider 0 where there is actually no data, right?
how can i get a way of ignoring nulls?
Community Manager

Re: tAggregateRow - sum double variables possible?

Hi
Use a tFilterRow to filter the rows that are empty or null value before tAggregateRow, and convert the data type from string to a numeric type for the oeration 'sum'.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business