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
Doubt in Join Stage
Moderators: chulett, rschirm, roy
Re: Doubt in Join Stage
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
HTH
Bob
Bob
-
- Participant
- Posts: 25
- Joined: Thu Oct 02, 2003 8:57 am
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
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
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.
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.
Happy DataStaging