Date conversion in PX

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
praj
Participant
Posts: 14
Joined: Sat Dec 20, 2003 12:46 am

Date conversion in PX

Post by praj »

Hi,

How do we handle date conversions in PX?

For server jobs, we can use iconv and oconv but in PX theres no such option. So then how to handle dates which are not in standard formats?
For ex: if you have a date like 24-dec-2003, there is no way but to have a file with dec->12 mapping and using this file as lookup.

ne help regarding same!!!!
TIA,
Praj
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Re: Date conversion in PX

Post by Teej »

praj wrote:For ex: if you have a date like 24-dec-2003, there is no way but to have a file with dec->12 mapping and using this file as lookup.
Build a large if then statement within the stage variables within the Transform stage that read in the the month string and convert them to numbers. Then do a StringToTimeStamp().

-T.J.
Developer of DataStage Parallel Engine (Orchestrate).
praj
Participant
Posts: 14
Joined: Sat Dec 20, 2003 12:46 am

Post by praj »

Thanx Teej,

That is what i have done but dont u think it will make process lil slow.

I thought of writing one single server job, in between my parallel jobs, for these kind of conversions, but then one will miss out the crux of PX.

Regards,
Praj
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post by Teej »

praj wrote:Thanx Teej,

That is what i have done but dont u think it will make process lil slow.

I thought of writing one single server job, in between my parallel jobs, for these kind of conversions, but then one will miss out the crux of PX.

Regards,
Praj
Do what I would do: Implement all possible solutions, and run a test of 1 million rows with all possible solutions, and see how the performance holds up.

I found that the performance held up pretty well for the if/then statement within PX. Difference in time processed was minimal compared to using a Buildop. In fact, Transform solution sometimes performs better than the buildop solution.

-T.J.
Developer of DataStage Parallel Engine (Orchestrate).
Post Reply