tAggregateRow - sum double variables possible?

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
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
Four Stars

Re: tAggregateRow - sum double variables possible?

Hi,

 

I have negative values in my data and i want to sum up using aggregate row.  but the results are as follows.

input:

-10

20

expected output:

10

actual output:

30

can someone help me? 

 

 

Thirteen Stars

Re: tAggregateRow - sum double variables possible?

@keerthi-gurudu,check the below screenshot.Untitled.pngUntitled.png

Manohar B
Four Stars

Re: tAggregateRow - sum double variables possible?

 @manodwhb

 

my job looks as below. I have my input coming from the file using tmap to get specific columns. this case sum is not working as expected? 

can u help me to resolve this issue?

Capture.PNG

Highlighted
Thirteen Stars

Re: tAggregateRow - sum double variables possible?

@keerthi-gurudu,in the invoiceout section,how many fields are you passing to taggregaterow?

Manohar B
Four Stars

Re: tAggregateRow - sum double variables possible?

@manodwhb

 

I am passing 3 fields

Invoice output: 

 Capture2.PNG

Aggregate row component screenshot:

Capture1.PNG

 

Four Stars

Re: tAggregateRow - sum double variables possible?

@manodwhb

I am passing 3 fields

Invoice output: 

 Capture2.PNG

Aggregate row component screenshot:

Capture1.PNG

 

Thirteen Stars

Re: tAggregateRow - sum double variables possible?

@keerthi-gurudu,based on the group by columns,your out put is varying ,please check.

Manohar B

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.