Merge stage

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
lathalr
Participant
Posts: 16
Joined: Thu Feb 14, 2013 6:00 am

Merge stage

Post by lathalr »

Hi All,

I have two different files. I want to merge two files but I don't have any common keys. So I have created a dummy key to merge two files. Master link having 13rows and reference having 5rows. But after merging, I am getting only 17rows. One row is missing. Please help me to get 18rows in my output.

Thanks in advance.
prasannakumarkk
Participant
Posts: 117
Joined: Wed Feb 06, 2013 9:24 am
Location: Chennai,TN, India

Post by prasannakumarkk »

In the both the link choose the partition method as hash and provide dummy column created as key
Thanks,
Prasanna
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

Hi,
Take a reject link from update and check "drop" method in merge stage, lets see one record should go to reject.
sudha03_vpr
Participant
Posts: 34
Joined: Tue Feb 26, 2013 9:36 am
Location: Chicago

Post by sudha03_vpr »

Is the key unique on both the links ?
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

Hi,
I think master inputs of the merge stage should not be duplicate on the key column.as part of preprocessing your data for merge stage,you should remove duplicate records from master dataset and if you have more then one update datasets,you must remove duplicate records.
Last edited by prasson_ibm on Fri Mar 08, 2013 11:36 am, edited 1 time in total.
sudha03_vpr
Participant
Posts: 34
Joined: Tue Feb 26, 2013 9:36 am
Location: Chicago

Post by sudha03_vpr »

Yes you are right prasson. If its duplicate then the data rejects are obvious.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Why really you need to merge when you do not know the keys? Anyways if you are merging it based on keys, and expecting total number of records, which means there won't be any record which will match. Why not use funnel in that case. May be just a bad choice of stage or you don't know why you need to merge it.

A little more details will help here.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Post Reply