Page 1 of 1

Transformer logic

Posted: Tue Jun 26, 2007 5:35 am
by scorpion
Hi Everybody,

I stuck with to implement some logic in my datstage job.

Below is the logic to populate one of my target column 'xxx'.

my source table is : SCORPION

In that i have columns like 'aaa','bbb','ccc'

logic to populate 'xxx'target column IS:

If the SCORPION.aaa(primary record) is not NULL then populate the target column XXX using logic below,
else if the SCORPION.aaa(primary record) is NULL then leave blank.

so if SCORPION.aaa(primary record) is not null:

select the 'bbb' for the secondary record that corresponds to the scorpion.ccc = scorpion.aaa for the primary record.

SQL is(if aaa is not null):

select v2.bbb from SCORPION V1,SCORPION v2 where the v2.ccc = v1.aaa

I need to implement in transformer level ,rather than database stage.

please advise me to resolve it.

Posted: Tue Jun 26, 2007 6:37 am
by ray.wurlod
You will also need a Lookup stage.
Use the Transformer stage or Filter stage to determine whether aaa is null. This stage has two outputs.
The output where aaa is not null feeds a Lookup stage.
The output from the Lookup stage and the "null" output from the Transformer stage are brought back together through a Funnel stage.

Posted: Tue Jun 26, 2007 8:13 am
by scorpion
Hi Ray,

Thanks for the reply,since I dont have a premier membership,I am not able to view your full message.

Does some body tell me,what is Ray's reply message.

Posted: Tue Jun 26, 2007 9:11 am
by ray.wurlod
Premium membership is only a few cents per day and serves entirely to help fund the bandwidth costs of DSXchange. I would prefer that nobody undermines this mechanism.

Posted: Tue Jun 26, 2007 9:43 am
by scorpion
Yes Ray,

I am planning to become a premium member,but what i meant that i asked non premimum members to explain the logic in the similar way,what you mentioned earlier.

Sorry for the confusion.

Thanks