Unable to get right table column data using merge or join

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
Nicole
Premium Member
Premium Member
Posts: 93
Joined: Mon Oct 22, 2007 12:55 pm
Location: Albany
Contact:

Unable to get right table column data using merge or join

Post by Nicole »

Hello everyone.

I'm trying to use the merge stage but am unable to get the data from the right table? What am I doing wrong? Any suggestions?

Also, I'm not even sure if I can use the merge stage for 2 DB2 tables? Is the merge stage only for flat files? Do I have to use the join? The same thing was happening with the Join? I was thinking I wasn't using the correct join. Again, if anyone has any suggestions it would be greatly appreciated!

Thanks,

Nicole
prasadduvasi
Participant
Posts: 19
Joined: Wed Feb 15, 2006 11:08 am

Post by prasadduvasi »

What you are trying to do actually?

If you want to join 2 tables then how do u want to join those tables i.e. left join or right join or inner join?

first go through the datastage manual and read about join,merge and lookup stages.
Prasad Duvasi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

In parallel jobs the Merge stage does not read from source (unlike its server job counterpart). Upstream of the Merge stage you will need appropriate database stages (for example DB2 Enterprise stages) to read the data.

You also need to partition and sort the data on the "join key(s)" specified in the Merge stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Nicole
Premium Member
Premium Member
Posts: 93
Joined: Mon Oct 22, 2007 12:55 pm
Location: Albany
Contact:

Unable to get data

Post by Nicole »

I think I am having issues because I am trying to join a table to another table after using the xml_input stage and the transformer for the my left table since I am extracting from an xml column. One thing I noticed was that I can't seem to select more than one key from the output columns on the xml input stage. It gives me the error 'more than one repetition rule selected'. I have tried to put the key columns in the same order, etc. but so far nothing seems to work. From the join, I can get data from one table or the other but not both in the final sequential file. I tried a basic join between 2 tables and that worked fine. If anyone has any ideas, please let me know. I hope this cleared up your question as to what I am trying to do. Thanks.
prasadduvasi wrote:What you are trying to do actually?

If you want to join 2 tables then how do u want to join those tables i.e. left join or right join or inner join?

first go through the datastage manual and read about join,merge and lookup stages.
prasadduvasi
Participant
Posts: 19
Joined: Wed Feb 15, 2006 11:08 am

Post by prasadduvasi »

Hi,

I havn't got knowledge about XML input stage ,But one thing i can say is that you can insert a copy stage after XML input stage and explicitly select the key columns from copy stage output
Prasad Duvasi
Post Reply