Hi all In the source table in databse,the type of column 'USA_USDUnitPrice' is decimal. When output in talend, it was bigdecimal. But I want to insert one row which 'USA_USDUnitPrice' values 0,and we get a error,can't convert bigdecimal to int. So i transfer it as Object type.,it works fine. However,in tAggregateRow,when i sum 'UnitPrice',I get the warning : 'Warning:the operation 'sum' for the output column 'USA_USDUnitPrice' can't be processed because of incompatible input and/or output types'. I think that it couldn't be sumed with the data type object,how can i solve this issue by a easy method. Thank you for any suggestion.
There are three tmaps,'USA','CAN',and 'USB',and three related column,'USA_USDUnitPrice','CAN_UnitPrice','USB_UnitPrice'. For example,in tMap 'USA',we get the value of 'USA_USDUnitPrice',and set the other two as 0.00;in tMap 'CAN',we get the value of 'CAN_USDUnitPrice' and set 'USA'AND 'CAN' as 0.00. At last ,we union these three all,and sum . Best Regards, Joe
Hi Shong it works. but i get a new problem. According to the requirement,I have to sum 'USA_USDUnitPrice' twice,and value to two defferent fileds,and here comes the error 'Duplicate field AggOperationStruct_tAggregateRow_1.SUA_USDUnitPrice_sum' how can i solve this ? Thank you very much Best Regards, Joe
Hi in the tAggregateRow, I will sum the field 'USA_USDUnitPrice' twice.
output Function input USA_USDUnitPrice sum USA_USDUnitPrice CAN_USDUnitPrice sum CAN_USDUnitPrice USA_USDUnitPrice sum USB_USDUnitPrice like this. and i will get the error. I just don't want to use another tMap to value for USB_USDUnitPrice. Each processing in tmap,it will take a lot of time. Best Regards, Joe