aggregator issue

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
cparru
Participant
Posts: 24
Joined: Wed Mar 07, 2007 11:22 am

aggregator issue

Post 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.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

The output column derived is defined to be dfloat (Decimal).

Convert it as Timestamp.
cparru
Participant
Posts: 24
Joined: Wed Mar 07, 2007 11:22 am

Post 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.
jseclen
Participant
Posts: 133
Joined: Wed Mar 05, 2003 4:19 pm
Location: Lima - Peru. Sudamerica
Contact:

Post by jseclen »

Hi cparru, :wink:

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. 8)
Saludos,

Miguel Seclén
Lima - Peru
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Try adding the Preserve Type optional propery to the 'Column for Calcuations' and set it to True.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply