Date options is Parallel transformer

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
gsym
Charter Member
Charter Member
Posts: 118
Joined: Thu Feb 02, 2006 3:05 pm

Date options is Parallel transformer

Post by gsym »

Recently I have been developing a parallel job to populate a time dimension. The time dimension has the usual columns such Date, Year, Quarter, Month name, Month days remaining, weekday number, weekday name, Year days remaining, week no etc

I was using the BASIC Transformer to obtain all the above. (ICONV, OCONV,Week.tag, Year.last etc)

But it seems that the BASIC transformer will be unable to work on the parallel grid we are using.

So my question is, are the date functions available in parallel jobs sufficient enough to obtain all the above columns. I looked through the PX documentation, the date functions specified therein seem to return numbers as output and do not seem to be very broad relative to the OCONV options.

I guess there is always the option of generating all this with SQL and loading it to the table, but for some reason they want it run thru a parallel job/transformer stage.

Any other suggestions ?
Last edited by gsym on Tue Feb 20, 2007 7:16 pm, edited 1 time in total.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

StringFromDate pops into my head as something similar. And there are several posts on PX date handling, this is one that I have 'bookmarked'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: Date options is Parallel transformer

Post by ray.wurlod »

gsym wrote:But it seems that the BASIC transformer will be unable to work on the parallel grid we are using.
Who said?
Of course it can - you just need to make sure it runs on a node where the DataStage run machine is installed. You can use a node pool or a one-node configuration file.
gsym wrote:for some reason they want it run thru a parallel job/transformer stage
Why?
If you already have a solution, why re-invent the wheel?
It probably CAN be done with parallel functions, but why would you bother? How many rows in your time dimension? A couple of thousand? I'd advocate using a server job.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gsym
Charter Member
Charter Member
Posts: 118
Joined: Thu Feb 02, 2006 3:05 pm

Re: Date options is Parallel transformer

Post by gsym »

ray.wurlod wrote:
gsym wrote:But it seems that the BASIC transformer will be unable to work on the parallel grid we are using.
Who said?
Of course it can - you just need to make sure it runs on a node where the DataStage run machine is installed. You can use a node pool or a one-node configuration file.
gsym wrote:for some reason they want it run thru a parallel job/transformer stage
Why?
If you already have a solution, why re-invent the wheel?
It probably CAN be done with parallel functions, but why would you bother? How many rows in your time dimension? A couple of thousand? I'd advocate using a server job.

The grid is so designed that no BASIC functions will work on it. It has its own scheduling/sequencing engine. And even if it could run, they are not willing to change that.

Server jobs are out too.

So, was wondering if ppl here can point me to some relevant parallel functions that can assist in obtaining the above mentioned column values...

At the least, it will be a good exercise in using parallel date functions (trying to be an optimist here :D)

Am at present looking at the date functions in the Modify stage.

Simple question - how do I obtain the names of months and weeks i.e., what format will get me this either in the parallel transformer or in the Modify stage ?
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

It depends on the function and parameter that you use, %mmm will give you Three character month abbrevation, %mm will give you 2 letter numerical representation of the month.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply