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.
Transformer logic
Moderators: chulett, rschirm, roy
Transformer logic
Thanx&Regards
scorpion
scorpion
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.