Page 1 of 1

Merging a DataBase table with Hashfile

Posted: Tue Dec 07, 2004 9:53 pm
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

Posted: Tue Dec 07, 2004 10:30 pm
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.

Posted: Tue Dec 07, 2004 11:03 pm
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

Posted: Tue Dec 07, 2004 11:22 pm
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