Join - comment info confusing!

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
newby
Participant
Posts: 5
Joined: Wed Dec 13, 2006 2:52 am
Location: England

Join - comment info confusing!

Post by newby »

Hello,

New to DS so would appreciate any help! I am looking at a join which has the following comment... "Performs cartesian product of the Facilty Expiry Date records with Time band codes".

Does anyone have any idea what this means?!

Thanks.
ajith
Participant
Posts: 86
Joined: Thu Nov 10, 2005 11:10 pm

Re: Join - comment info confusing!

Post by ajith »

newby wrote:Hello,

New to DS so would appreciate any help! I am looking at a join which has the following comment... "Performs cartesian product of the Facilty Expiry Date records with Time band codes".

Does anyone have any idea what this means?!

Thanks.

Welcome aboard Newbie,

Cartesian product is a database concept rather than a Datastage concept so, It's not Datastage which confused you.

A cartesian product is is the result of an unrestricted join of two or more tables. ie Two or more tables are joined without any join conditions.
So if you are joining a table with 5 rows and a table with 6 rows after the join it will have 30 rows with all the possible combinations of columns in two tables.

Say, a table Employee with id and name is there and

1 a
and 2 b are the only rows it contains

Another table with only termination date is there and that is the only column it has

and let

2000-01-19
9999-12-31

are the rows contained by it

If you take a cartesian product of these tables it will look like

1 a 2000-01-19
1 a 9999-12-31
2 b 2000-01-19
2 b 9999-12-31

Hope that helps ..

Ajith
newby
Participant
Posts: 5
Joined: Wed Dec 13, 2006 2:52 am
Location: England

Re: Join - comment info confusing!

Post by newby »

Ajith,

That's great - thanks very much for your help!
Post Reply