I am going to use the DENORMALIZE component that was suggested to Albert, but it would be nice for us if the AGGREGATE component did do this sort of concatentate (string concatenation instead of the number addition of sum), because most of our fields will need functions identical to those offered by AGGREGATE. For example, we have something like:
key, buyer, amt_paid, paid_date
1, albert, 22.00, 12/31/2008
1, daniel, 23.00, 12/01/2008
1, martin, 40.00, 12/30/2008
2, diane, 55.00, 11/28/2008
2, anne, 20.00, 12/01/2008
2, clayton, 15.00, 12/15/2008
What I would want to do is sort by key, then date descending, and produce a mapping like:
$key:=$key;$buyers:=concatenate($buyer,~);$amt_paid:=sum($amt_paid);$final_paid_date:=first($paid_date)
which would get me the following results (assuming I do this right manually!):
key,buyers,amt_paid,final_paid_date
1,albert~daniel~martin,85.00,12/31/2008
2,diane~anne~clayton,90.00,12/15/2008
If I use the DENORMALIZER component, it sounds like I have to reproduce the same functions as AGGREGATE component (Maybe there’s a way to expose the AGGREGATE component functions in the DENOMRALIZER component?). It’s not hard, but I wonder if this DENORMALIZER will have as good performance as the Clover AGGREGATE component. On the other hand, ‘concatenate’ not be a common case for other users, I’m sure you’re flooded with request to add very custom functionality to Clover’s core, and it sounds like this is one of the reasons the DENORMALIZER component exists (to handle custom cases).
Any thoughts?
Anna