Combining two hash files.

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
vinovenkat
Participant
Posts: 8
Joined: Mon Dec 29, 2008 5:24 am

Combining two hash files.

Post by vinovenkat »

Hi ,
i have situation where i need to combine two hash files.The first hash file has got compound unique key.The second file also has got compound unique key.
Thevalues in the hash file looks like this...
Hash file 1:
A1 B1 C1 D1 (combination of 4 values is unique)
A1 B1 C1 D2
A2 B1 c1 D1
.
.

Hash file 2 :
A1 E1 (combination of this two is unique)
A1 E2
A1 E3
A1 E4

Now i want to combine these two files on the basis of the column A1.But i am not able to combine them.
The final format should look like this

A1 B1 C1 D1 E1
A1 B1 C1 D1 E2
A1 B1 C1 D1 E3
A1 B1 C1 D1 E4
A2 ............

How to approach it???
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post by hamzaqk »

if field A1 is common in both the "hashed" and not the hash files i think it would be a good idea to join them on the field A1 and then pass the columns A1 B1 C1 D1 E4 to the output with the desired key columns into a new "hashed" and not hash file.
Teradata Certified Master V2R5
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a UniVerse stage and perform a regular join in the WHERE clause of the SQL (on the Selection tab).

You may need to create VOC pointers to the hashed files for this to work.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply