Page 1 of 1

Unable to get right table column data using merge or join

Posted: Tue Oct 23, 2007 11:56 am
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

Posted: Tue Oct 23, 2007 12:14 pm
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.

Posted: Tue Oct 23, 2007 3:47 pm
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.

Unable to get data

Posted: Wed Oct 24, 2007 8:00 am
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.

Posted: Thu Oct 25, 2007 9:21 am
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