Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

Joe
2011-09-08 09:11:40

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

shong
2011-09-08 07:14:43

Hi
Where do you sum 'USA_USDUnitPrice' twice? Can you upload a screenshot?

Best regards
Shong

Joe
2011-09-08 05:10:17

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

shong
2011-09-08 04:40:34

Hi
Set a default value for bigDecimal type as below:
new java.math.BigDecimal(0)

union these three all and sum them on tAggregateRow, select 'bigDecimal' type on output table.

Best regards
Shong

Joe
2011-09-08 04:06:04

Hi Shong
 
        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

shong
2011-09-08 03:47:58

Hi Joe
Yes, you are right. it couldn't be sumed with the data type object!

But  I want  to insert one row which 'USA_USDUnitPrice'  values 0,

Sorry, I don't understand why you want to insert value 0 but doing 'sum' operation on this column?

Best regards
Shong

Joe
2011-09-08 03:19:06

Hi shong
 
         I send it again both to your two email. pls check your email again. Thank you very much.

Best Regards
Joe

shong
2011-09-08 03:10:24

Hi Joe
I did't receive any email from you, which email have you sent to? Please try again.

Best regards
Shong

Joe
2011-09-08 02:45:55

Hi shong

        any suggestion about the job that i send to you?

Thank you very much   
Joe

Joe
2011-09-06 10:19:54

Hi shong
I have sent the sample and some screenshot to you.
Thank you for your help.

Best Regards
Joe

shong
2011-09-06 09:56:48

Hi Joe
Yes, just do it. Export the job and send it to me.

Best regards
Shong

Joe
2011-09-06 09:52:32

Hi Shong
     Thank you for your reply.
     We can't upload or download any source without the permission of IT. Maybe I can Email you some screenshot .
     Is that ok?

Joe

shong
2011-09-06 09:49:24

Hi Joe
Can you upload some screenshots of job?

Best regards
Shong

Joe
2011-09-06 09:08:30

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.


Best Regards
Joe

Board footer

Powered by FluxBB