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
kumar444
Premium Member
Posts: 62 Joined: Wed Jan 12, 2011 10:01 am
Post
by kumar444 » Wed Jun 22, 2011 7:15 pm
I need to implement the below condition in lookup or outside of lookup.
Assume 'a' and 'b' as two tables.
a.casenum<>b.casenum and
a.regno<>b.regno
In the above case, I also need to know two different scenarios below.
1) Output columns ---> a.casenum and a.regno
2) Output columns ---> b.casenum and b.regno
Any suggestions would be appreciated.
Thanks.
-------------------------------------------
Kumar
SURA
Premium Member
Posts: 1229 Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney
Post
by SURA » Wed Jun 22, 2011 7:28 pm
I am not sure about "Outside of lookup"
But you can use a Full outer in join stage (source is left) and in the Transformer you can play with your conditions.
DS User
kumar444
Premium Member
Posts: 62 Joined: Wed Jan 12, 2011 10:01 am
Post
by kumar444 » Wed Jun 22, 2011 7:38 pm
Thanks Sura.
Did you mean to say-----
using full outer join in join stage
and filter where b.casenum and b.regno are null in transformer stage.
This is good idea.
How about in lookup?
-------------------------------------------
Kumar
SURA
Premium Member
Posts: 1229 Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney
Post
by SURA » Wed Jun 22, 2011 7:59 pm
As far as i know, by default Lookup will work like inner join. Still you can do it with Lookup by giving different name to any one of the metadata , taken out from the reject link and then you can play.
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Thu Jun 23, 2011 4:13 am
Default Lookup will work like left outer join (using Continue rule) or inner join (using Drop rule). It can not perform full outer join.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar444
Premium Member
Posts: 62 Joined: Wed Jan 12, 2011 10:01 am
Post
by kumar444 » Thu Jun 23, 2011 9:43 am
Thanks Ray and Sura.
I have used two methods.
1) lookup (Reject option)
2) Outer join and filter
What do i do with main stream coming out of the lookup ? I have no use with it. Can i send it to copy stage as a target ?
-------------------------------------------
Kumar
jwiles
Premium Member
Posts: 1274 Joined: Sun Nov 14, 2004 8:50 pm
Contact:
Post
by jwiles » Thu Jun 23, 2011 9:46 am
You could do that, as well as send all records to the main output and filter them similar to the way you've done the join. Either method should work.
Regards,
- james wiles
All generalizations are false, including this one - Mark Twain.
kumar444
Premium Member
Posts: 62 Joined: Wed Jan 12, 2011 10:01 am
Post
by kumar444 » Thu Jun 23, 2011 10:31 am
Thanks much Jwiles.
-------------------------------------------
Kumar