error on aggregator

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

error on aggregator

Post 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".
Jai_sahaj
Participant
Posts: 7
Joined: Mon Nov 10, 2003 1:11 pm

Post 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...
vishnuhpatel
Participant
Posts: 3
Joined: Mon Nov 20, 2006 9:34 am
Location: mumbai

Re: error on aggregator

Post 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.
csrazdan
Participant
Posts: 127
Joined: Wed May 12, 2004 6:03 pm
Location: Chicago IL

Post 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...
Assume everything I say or do is positive
Post Reply