How can we join the tables from diperate source databases

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
irajasekharhexa
Premium Member
Premium Member
Posts: 82
Joined: Fri Jun 03, 2005 5:23 am
Location: Bangalore
Contact:

How can we join the tables from diperate source databases

Post by irajasekharhexa »

Hi all,

Till now we have developed server jobs in which we used DRS Stages as the source stage, Is there any method to join the tables which are taking from diffrent source databases. if so what is the method.

Can any body tell this pls.
Rajasekhar
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Depends upon the how many rows we are looking at. If not much then unload the tables into hashed files and proceed from there. If the count is large then you might want to look into using staging/temp tables in the same database schema and join the tables by passing a sql join through DataStage.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Provided you only want inner or left outer joins, then you can use the conventional lookup mechanism in DataStage, using a Transformer stage. The stream link can come from one data source, the reference input link from the other. Obviously you need to generate a suitable reference key expression, one which will match.

If going to the second data source on the reference input link is too slow you can, as others suggested, load rows from there into a hashed file prior to running the "join". Only load those rows and columns that you will actually need, to conserve memory (and disk) resources.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
irajasekharhexa
Premium Member
Premium Member
Posts: 82
Joined: Fri Jun 03, 2005 5:23 am
Location: Bangalore
Contact:

Thanks

Post by irajasekharhexa »

ray.wurlod wrote:Provided you only want inner or left outer joins, then you can use the conventional lookup mechanism in DataStage, using a Transformer stage. The stream link can come from one data source, the reference input link from the other. Obviously you need to generate a suitable reference key expression, one which will match.

If going to the second data source on the reference input link is too slow you can, as others suggested, load rows from there into a hashed file prior to running the "join". Only load those rows and columns that you will actually need, to conserve memory (and disk) resources.

Thanks lot Ray and DSguru
Rajasekhar
Post Reply