Page 1 of 1

Dynamically assigned values

Posted: Sun Apr 19, 2009 10:43 pm
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

Re: Dynamically assigned values

Posted: Mon Apr 20, 2009 1:49 am
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 ?

Posted: Mon Apr 20, 2009 2:26 am
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.

Posted: Mon Apr 20, 2009 7:35 am
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

Posted: Mon Apr 20, 2009 8:40 am
by chulett
You will not be able to achieve this without stage variables. And yes, parallelism / partitioning could affect this.