Inner and outer joins

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
caltog
Premium Member
Premium Member
Posts: 39
Joined: Thu May 22, 2003 7:32 am

Inner and outer joins

Post by caltog »

What are the different possibilities (if they are more than one) to perform an outer or an inner join between tables ?

(I know it's very easy question, but I've been trying so many things and I didn't get yet what i want...)
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

If you do a join within a transformer where one of the tables is a reference or lookup then by default you get an outer join to that table. You need to add a constraint to the transformer to turn it into an inner join, or you can add logic to your output rows to do certain field settings where there is no join to make it a smart outer join.

You can also join tables within a database input stage, this time the default is an inner join, you can make it an outer join using custom SQL or for Oracle you can put the outer join sign in the WHERE field.

Joining within the database stage usually provides faster processing, joining within the tranformer gives you a bit more control within the ETL environment to handle different join conditions.

Vincent McBurney
Data Integration Services
www.intramatix.com
ariear
Participant
Posts: 237
Joined: Thu Dec 26, 2002 2:19 pm

Post by ariear »

Exactly,
But if you need a full outer join (a complte set) you'll have to check with each RDBMS or have a 2 lookups job in DataStage (Or another trick)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Server Jobs
If you've staged your table data into two sequential files, then the Merge stage can perform any kind of join.

Parallel Jobs
The Join stage can perform any kind of join involving two or more datasets.
The Merge stage combines a sorted master data set with one or more sorted update data sets.
The Lookup File Set stage can perform a lookup against a stored dataset.

Mainframe Jobs
The Join stage can perform inner or outer joins on data derived from two source stages.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
caltog
Premium Member
Premium Member
Posts: 39
Joined: Thu May 22, 2003 7:32 am

Post by caltog »

Hi everybody,

thanks for your help and for your time :)
Post Reply