Im trying to find out the maximum date by grouping Cus_code (A1,A2,A3..)from the following (.csv file)
using IBM Websphere Datastage(8.0) [parallel Job]
Source Data is like....
A1,2005-06-03,pending,2500
A1,2004-05-04,ok,3400
A1,2004-05-04,pending,4070
A3,2005-06-03,ok,5016
A2,2008-06-03,not ok,6908
A1,2004-05-04,clarified,7854
A1,2005-06-03,reverted,10692
A2,2004-05-04,not ok,11638
A3,2012-06-03,clarified,12584
A1,2030-05-04,pending,13530
The Metadata for the Source is :-
Cus_code Varchar(10)
Update_dt Date
Status Varchar(15)
Amount Decimal
How this can be implemented? whether aggegator can be used?
Please Help me in this regard
Thanks in Advance
Sivaram
Maximum value of Date
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 247
- Joined: Thu Apr 27, 2006 6:38 am
- Location: Hyderabad
Thnx for ur response!!
I already tried with aggeregator stage as u told, job is aborting with error in director log as
" Aggregator_7: Error when checking operator: When binding input interface field "St_Dt" to field "St_Dt": No default type conversion from type "date" to type "dfloat". [api\interface_rep.C:806]"
NB:My date format is 'yyyy-mm-dd'.
Thanks
Sivaram
I already tried with aggeregator stage as u told, job is aborting with error in director log as
" Aggregator_7: Error when checking operator: When binding input interface field "St_Dt" to field "St_Dt": No default type conversion from type "date" to type "dfloat". [api\interface_rep.C:806]"
NB:My date format is 'yyyy-mm-dd'.
Thanks
Sivaram
Hi gbusson,
Thanks!! I have tried the first mentioned method ie by converting the date to julian then aggregating and reconverting it to Date. It worked fine...
Is there any other possible ways to convert date to numeric other than julian which I have used here ???
Thanks in advance...
Sivaram
Thanks!! I have tried the first mentioned method ie by converting the date to julian then aggregating and reconverting it to Date. It worked fine...
Is there any other possible ways to convert date to numeric other than julian which I have used here ???
Thanks in advance...
Sivaram
EssEss
-
- Premium Member
- Posts: 288
- Joined: Tue May 27, 2008 3:42 am
- Location: Luxembourg
Old topic (I know) but I had to go through this (and other similar ones) since I was looking for a solution.
On a hunch I tried the option Preserve type = True within the Aggregator itself....worked fine... No more warnings / aborts.
Basically what happens I guess is on choosing to preserve the datatype the output of the aggregator remains in iys source format.
On a hunch I tried the option Preserve type = True within the Aggregator itself....worked fine... No more warnings / aborts.
Basically what happens I guess is on choosing to preserve the datatype the output of the aggregator remains in iys source format.
Tony
BI Consultant - Datastage
BI Consultant - Datastage