Page 1 of 1

aggregator problem

Posted: Mon Sep 20, 2010 9:06 am
by rsunny
Hi Every one ,

1. I used some stages to develop the job. I am having a problem with the aggregator stage as when i perform the function 'Sum' in aggregator stage,
I am getting an error saying that invalid argument type. When I use with any other functions in aggregator stage, it is working.

The process of the job is as follows: I am grouping two fields and I have to sum based on the grouping fields. I know this is not a typical job but I am not sure why i am getting an error only with the Sum function in aggregator stage. I also checked with different Data types like Varchar, Integer, Long Varchar but still not working. Can any one suggest me what is the solution for this error?

Thanks in advance

Posted: Mon Sep 20, 2010 9:12 am
by asorrell
rsunny,

1) Don't hijack a thread (even your own) with a completely different problem. Post both separately. In this case I'd suggest cutting the second problem out and posting it as it's own issue.

2) If you want an specific answer to your question you need to post details! You need to cut and paste exact error messages and showing the exact code you are using.

In the first problem I suspect your problem is you should either be using DFLOAT as a variable type or using a decimal override on the output and then selecting decimal as your variable type. However, that's a guess because you didn't post any specifics on input variables and output variable types.

In the second problem we need to see the code you are using - please post it in a separate post.

Posted: Mon Sep 20, 2010 10:51 am
by rsunny
The datatype i have used for both input and output variables as Vchar.I havent used any decimal override on the outpu.

Posted: Mon Sep 20, 2010 10:55 am
by rsunny
Is there anyway that we can use that logic in transformer like adding based on the group as i tried with aggregator for many times but its not working.

Thanks in advance

Posted: Mon Sep 20, 2010 2:09 pm
by ray.wurlod
Are you saying that you're trying to sum a VarChar data type?

Please post the exact properties you've used in the Aggregator stage, as well as whether your data are sorted (and, if so, on what fields).

Posted: Mon Sep 20, 2010 6:35 pm
by rsunny
Hi everyone ,


Thanks for the reply .i got the solution as i used real as datatype instead of varchar ,it worked

Posted: Mon Sep 20, 2010 8:29 pm
by ray.wurlod
Unreal!
:lol: