Transformer logic

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
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Transformer logic

Post 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.
Thanx&Regards
scorpion
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post 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.
Thanx&Regards
scorpion
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post 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
Thanx&Regards
scorpion
Post Reply