Dynamically assigned values

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
Novak
Participant
Posts: 97
Joined: Mon May 21, 2007 10:08 pm
Location: Australia

Dynamically assigned values

Post by Novak »

Hi All,

If I manage to explain this right, this question will surely be answered quickly...

In PX edition, are you always guaranteed to get the target field populated based on some values from another field. For example:

Source Table (input to the transformer)
---------------
col1 col2
a, 123
b, 456
c, 789
d, 012

Transformer
---------------
a -> A
b -> B
c+d -> C
a+b -> D

So, for some target fields in transformer the computation is required. What I need to be told is, are we always going to get this computation taking place (given the source fields are never null) as specified above without involving stage variables of transformer? I mean, does the specification in the column derivation suffice?

Regards,

Novak
Pagadrai
Participant
Posts: 111
Joined: Fri Dec 31, 2004 1:16 am
Location: Chennai

Re: Dynamically assigned values

Post by Pagadrai »

Hi Novak
The scenario you explained is not clear.
are you trying to add values or map one i/p value to another key value in target ?
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Hi Novak,

Eventhough the problem is not clear.

Stage variables are used to

Control the execution of Statements.
Hold Previous values to perform some comparision.
Simplify the Derivation.

If all those are not required you can definately use computation logic in column derivation.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Novak
Participant
Posts: 97
Joined: Mon May 21, 2007 10:08 pm
Location: Australia

Post by Novak »

Hi,

Just with one of your replies I am close to getting this answered fully. But anyhow...
What I meant was - considering just the inputs into the transformer and no stage variables used, are you always guaranteed to get the below given results in the target output field.
For example again:

Source Table (input to the transformer)
---------------
col1 col2
a, 123
b, 456
c, 789
d, 012

Transformer
---------------
input | derivation | output
a a A
b b B
c+d c+d C
a+b a+b D

Will the D field definitely and always going to result in 579(123+456) with those input values? Or is it possible that due to parallelism some of the inputs might be different or inaccessible at different times?

Regards,

Novak
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You will not be able to achieve this without stage variables. And yes, parallelism / partitioning could affect this.
-craig

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