Page 1 of 1
aggregator issue
Posted: Wed Aug 19, 2009 2:41 pm
by cparru
Hi,
I was trying to do a MAX(TIMESTAMP_FIELD). and the job is failing with the error "No default type conversion from type "timestamp" to type "dfloat"."
Pls help me in resolving this.
Thanks in advance.
Posted: Wed Aug 19, 2009 2:42 pm
by Sainath.Srinivasan
The output column derived is defined to be dfloat (Decimal).
Convert it as Timestamp.
Posted: Wed Aug 19, 2009 3:27 pm
by cparru
Sainath.Srinivasan wrote:The output column derived is defined to be dfloat (Decimal).
Convert it as Timestamp. ...
Hi,
I tried that too.. but its the same error.
MAX_LAST_UPD_DT was defined as TIMESTAMP on the ouput tab. Do you think of any other work around.
Thanks for your immediate response.
Posted: Wed Aug 19, 2009 3:34 pm
by jseclen
Hi cparru,
The aggregator stage only accept numeric fields (integer, decimal, float, ect), and the result is dfloat, always, so, you must to make a conversion to the source field.
Example:
2009-08-10 08:19:01 convert to
20090810081901. with this number you must to apply the MAX. The result must be reformated to the timestamp format.
i had a problem to obtain max, min for strings and dates fields, i discovered the reason, the aggregator dont work with that datatypes.
i hope this help.
Posted: Wed Aug 19, 2009 3:41 pm
by chulett
Try adding the Preserve Type optional propery to the 'Column for Calcuations' and set it to True.