How to get full outer join using join stage

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
vijaydev
Participant
Posts: 54
Joined: Sun May 20, 2007 6:31 pm

How to get full outer join using join stage

Post by vijaydev »

Hi,

I want to get full outer join results by using three tables.

first i am trying to get full outer join results using two tables.
In the join stage out put/mapping tab it is showing left record and right record how to mapp this to get full outer join results.

Thanks in Advance!

-Vijay
samsuf2002
Premium Member
Premium Member
Posts: 397
Joined: Wed Apr 12, 2006 2:28 pm
Location: Tennesse

Post by samsuf2002 »

You can full outer join two tables first using a join stage and then pass the output into another join stage for another full outer join.

There should be many other ways if you search the forum.

For left and right record (might be your link names), it doesn't really matter unless you are mapping the required columns to the output.
hi sam here
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Or do it in db itself.
mk_ds09
Participant
Posts: 72
Joined: Sun Jan 25, 2009 4:50 pm
Location: Pune

Post by mk_ds09 »

If before join stage , in the same job u r using database stage, it will easier for you to modify the query..!

Just in case if your doing some transformations and then using the values from repsective tables then u can use the approach suggested by the post above..


hope this helps

MK :)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

U is one of our posters and is currently working on a server-only project. The second person personal pronoun in English is spelled "you", not "u". And the present tense of the verb "to be" in the second person is spelled "are", not "r".

Please strive for a professional standard of written English on DSXchange. This makes it easier for readers whose first language is not English.

Do you document your actual work using SMS-style abbreviations? Then don't do so here either. DSXchange is not a mobile telephone.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Alokby
Premium Member
Premium Member
Posts: 9
Joined: Wed Sep 15, 2004 7:27 am

Post by Alokby »

Join Stage in EE will perform full outer join to many tables. Also, one may do the left outer join using SQL. If one has more than two tables to join, I would recommend to use Join Stage in EE over using the database.
vasa_dxx
Participant
Posts: 39
Joined: Sun Sep 28, 2008 2:59 am
Contact:

Post by vasa_dxx »

I commend on Joining the tables in the sourcing query, which is faster & efficient. If a join stage is used, it will burden Perfomance as there will be more backstage processes running.
To design the job more simpler(visually) & improve performance all the possible logics(Business Rules) are tried to incorporate wihin the Sourcing query, wherever used.
Two wrongs don't make a right. But three lefts do.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Be very careful when making absolute assertions such as these. As always, "it depends".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vasa_dxx
Participant
Posts: 39
Joined: Sun Sep 28, 2008 2:59 am
Contact:

Post by vasa_dxx »

Thanks Ray. could you please give an example or two where the above assumptions may not hold good/valid. Or did I miscommunicate regarding backstage processes.
Please correct me.
Two wrongs don't make a right. But three lefts do.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A very simple counter-example is where there is a slow connection to the source database, or where the source database is comparatively very busy compared to the DataStage server.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
yammanur.dwhcareer
Participant
Posts: 7
Joined: Sun Apr 10, 2011 11:30 am
Location: Delhi

Re: How to get full outer join using join stage

Post by yammanur.dwhcareer »

Hi Vijay!

As per my understanding you are struggling at the first join whenever it displayed left record and right record. You can send the both left and right records and put a transformer after the join and write a condition like if the left record is null then populate the right one otherwise left one and then join with the third table and do the same next..
i think it will satisfy your requirements.....
Post Reply