Page 1 of 1

Date options is Parallel transformer

Posted: Tue Feb 20, 2007 6:33 pm
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 ?

Posted: Tue Feb 20, 2007 6:45 pm
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'.

Re: Date options is Parallel transformer

Posted: Tue Feb 20, 2007 8:18 pm
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.

Re: Date options is Parallel transformer

Posted: Tue Feb 20, 2007 8:57 pm
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 ?

Posted: Tue Feb 20, 2007 9:30 pm
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.