Hi,
In one of my job there is a requierement where i has to summarize the data based on 3 different source files. So i used to combine the three files by one Merge stage and one Join stage based on Key column.
My Doubt is at the merge stage if one of the Inputstream doesn't contain any data then what would be the data sholud populated in the corresponding columns of that link.(Means if data is not going to match or if there is no record at one of the link to compare the key columns ,what would be the result values in the no data corresponding columns?)
In my Job case the rows are populating with 0 values. Is it Correct or If I use Join stage instead of Merge stage does it effects the functionlity of the Job?
I tried by using the Join stage is also. I didn't notice any difference in fuctionality of the designed job in both the cases.
file1
JoinStage------->Output
file2--------
Mergestage--------------
file3---------
Can any body focus some light on the above doubts?
Regds
Merge Stage
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 82
- Joined: Fri Jun 03, 2005 5:23 am
- Location: Bangalore
- Contact:
Merge Stage
Rajasekhar
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If there are 0 rows on the master input of a Merge stage you would expect there to be 0 rows on its output link.
Similarly if there are 0 rows on the left input of a Join stage you would expect there to be 0 rows on its output link for inner and left outer joins.
Similarly if there are 0 rows on the left input of a Join stage you would expect there to be 0 rows on its output link for inner and left outer joins.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Charter Member
- Posts: 299
- Joined: Wed Nov 13, 2002 5:38 pm
- Location: USA
Think of them like they are doing SQL joins. You need a driving input stream. If this stream contains no data, no output is possible. Just like in a SQL join. If a inner join and one table is empty, the result is empty. In a left outer join, if the driving table is empty so is the output. The Join stage calls this driving input stream the left and all others the right or intermediate if more than two. The Merge stage calls it the Master and update links. The same SQL rules apply when actually wanting a Inner, left or right outer join. Unmatched driving input rows will produce NULLS in the unmatched fields of the right/intermediate/Update input links.