Merge/Join 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
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Merge/Join Stage

Post by sam334 »

All, Have a confusion.
I have one query in db2 which (Source 1) looks like,
DATE,COUNTRY,PRODUCT,NUMOFPRODUCTS
There are total 200 rows with product count Country and Product wise.
Source 2 - DB2, looks like,
DATE,COUNTRY,PRODUCT,NUMOFPRODUCTSFILTERED
but it has a filter so number of records are 100.

How we can combine these two. The final excel file should look like,

DATE,COUNTRY,PRODUCT,NUMOFPRODUCTS,NUMOFPRODUCTSFILTERED.

I used merged stages before where Product and Country were same number of records. But here i cant merged based on any key as total rows differ.

Appreciate your help.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What makes you think you can't merge them? Have you tried? If you have and you had either errors or unexpected results, explain for us what you did and what results you had.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Yes Craig.I tried many times. Below are the errors.
Update record (0) of data set 2 is rejected; there is no master record.
and
Master record (1) is a duplicats.

When i used reject file , it shows multiple reject records from update link.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

From what I recall, those 'errors' are normal when (for example) there is no matching master record and they would go down the reject link you should have in place. And apparently you should get 100 of them. Ignore them. Do you get the 100 that you want as well, not rejected?

And the Merge stage requires there be no duplicates in the data.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Craig,yes this the master record match issues. I am not getting 100 as 16 are getting rejected. Is there anyway we can stop merge stage to reject records..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's hard for anyone to say anything other than 'ensure there are no data issues that will cause rejects'. Look at why those 16 (that I assume you think shouldn't be) are getting rejected and see what you can do about them. Design issue? Settings? Data?

If you need more help we would need much more in the way of gory details to be able to help out intelligently...
-craig

"You can never have too many knives" -- Logan Nine Fingers
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Ok Sure. Let me do some more research. Thanks.
Post Reply