Page 1 of 1

error on aggregator

Posted: Tue May 08, 2007 9:05 am
by reddy12
How can I get min value of date from aggregator stage? I am getting the below warnings.

Can you please help me?

Aggregator_1: Error when checking operator: When binding input interface field "DATE1" to field "DATE1": No default type conversion from type "timestamp" to type "dfloat".
Error when checking operator: When binding input interface field "DATE2" to field "DATE2": No default type conversion from type "timestamp" to type "dfloat".

Posted: Tue May 08, 2007 10:31 am
by Jai_sahaj
You can get a MIN or MAX of only a number column in Aggregator stage in PX.... :(
The easist way would be to use a sort->Remove Duplicate stages after adding a constant value column and sorting on the date-field you want the MAX for.
Another way of doing it would be to derive a new integer for the timestamp columns by comparing it to a low timestamp like 01-01-1900 00:00:00 and get the MAX of the integer to get the record with max date...

Re: error on aggregator

Posted: Wed May 09, 2007 12:44 am
by vishnuhpatel
reddy12 wrote:How can I get min value of date from aggregator stage? I am getting the below warnings.

Can you please help me?

Aggregator_1: Error when checking operator: When binding input interface field "DATE1" to field "DATE1": No default type conversion from type "timestamp" to type "dfloat".
Error when checking operator: When binding input interface field "DATE2" to field "DATE2": No default type conversion from type "timestamp" to type "dfloat".

User sort stage on Date field and then use header/tailer stage to get min/max date.

Posted: Wed May 09, 2007 10:49 am
by csrazdan
Jai_sahaj wrote:You can get a MIN or MAX of only a number column in Aggregator stage in PX.... :(
The easist way would be to use a sort->Remove Duplicate stages after adding a constant value column and sorting on the date-field you want the MAX for.
Another way of doing it would be to derive a new integer for the timestamp columns by comparing it to a low timestamp like 01-01-1900 00:00:00 and get the MAX of the integer to get the record with max date...
On more way is to convert the date to Julien date in a Transformer and then pass it to Aggregator stage. Do MIN and MAX and then convert Julien date back to date format you want it in.

Hope it helps...