Merging a DataBase table with Hashfile

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
Pavan_Yelugula
Premium Member
Premium Member
Posts: 133
Joined: Tue Nov 23, 2004 11:24 pm
Location: India

Merging a DataBase table with Hashfile

Post by Pavan_Yelugula »

hi all
i have a stream of data coming in from a hash file.i have a table which holds additional information for the stream of records coming in.

i want to join both the streams of data based on a key.

Solution 1:i could use a transformer and made my table as a refernce link and Lkup and fill the information.
I guess this will not work because i have duplicates for the joining column in my table

Solution 2: i got to use a Merge stage to join these streams.
Problem with this approach Merge takes only works on files in server.

Is putting the Data from my table in to hash file and working with merge only way or is there any way out of this?

Thanks and Regards
Pavan
davidnemirovsky
Participant
Posts: 85
Joined: Fri Jun 04, 2004 2:30 am
Location: Melbourne, Australia
Contact:

Post by davidnemirovsky »

I would put your table into a hashed file and then use one hashed file as the Input to a Transformer stage and the other hashed file as a look up. You won't need the Merge stage. Make sure the keys that need to match are in the exact same format.
Cheers,
Dave Nemirovsky
Pavan_Yelugula
Premium Member
Premium Member
Posts: 133
Joined: Tue Nov 23, 2004 11:24 pm
Location: India

Post by Pavan_Yelugula »

i have Recurring entries of the key on which i want to use.

either i got to put it in to a sequential file and merge the streams or put the data into the hash file with a different key if it is a different key i don guess it will allow me to look up on the key i wanted in the hash file
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Instead of table lookup use the hash file so that you won't have duplicates in the lookup.

Merge is used with sequential and you can't use this with hash file. Make sure that you eliminate the duplicates with correct logic.

Cheers
Regards
Siva

Listening to the Learned

"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Post Reply