Page 1 of 1

Doubt in Join Stage

Posted: Thu Sep 23, 2004 2:50 am
by Madhav_M
Hi
I am having 3 input links to a join stage and an output link.
I there is any possibility of getting more rows in the output than the input links. ie, if total rows of input links of join stage is 100 and output link of join can be more than 100.

Expecting ur assitance

Posted: Thu Sep 23, 2004 3:10 am
by richdhan
Hi Madhav,

It depends on the type of join. What is the type of join you have defined for your join stage? Why are you using 3 input links. Pls give more details. It will help others share their experiences.

HTH
--Rich

Pride comes before a fall
Humility comes before honour

Posted: Thu Sep 23, 2004 7:25 am
by Madhav_M
I'm using Left Outer Joing.
In the first link i'm taking fields without transformation(Asis) from table1 and table2
in the second link calculating a measure from table1 and table3
and in the 3rd link caluculating some more measure from table1 and table4
I have common keys also :(

Re: Doubt in Join Stage

Posted: Thu Sep 23, 2004 7:45 am
by bobyon
I can't think of any way you would get more rows than the total number of rows coming in. Even using a full outer join would not "create" additional rows.

HTH
Bob

Posted: Fri Sep 24, 2004 2:25 am
by leo_t_nice
Hi

Yes it is possible to get more rows out than went in... It is the same as SQL if you dont make the full join between tables. I think its called a cartesian product.

For example you could have 2 records in one table and 2 records in the join table and get 4 rows out (for each row in the first table, you get 2 rows from the join table).

If you are getting more rows out, then you probably need to look at which fields you are specifying in the join stage. I guess you have something missing from the key specification.

Hope this helps
L

Posted: Fri Sep 24, 2004 3:42 am
by Madhav_M
Thanks a lot for ur assitance.

Posted: Wed Sep 29, 2004 7:55 am
by dsxdev
From my experience, a Join Stage works same as a Database join (output wise). There is every possibility of getting output no of records more than in put.

You are dong a left outer join
Suppose you have 10 input records(left link) and 6 records on right link.
Out of these 6 records 3 records match with 4 records on left link and out of the 3 records on right link two records have same values for key columns 2 records on left link match these values.
Then your output will be
6 non matching records + 2(on left link) *2(on right link) + 2(left link)*1(right link)=12 records.

if you are getting more than this then the problem would be some where else.