Merge Header and Detail 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
marc_brown98
Premium Member
Premium Member
Posts: 67
Joined: Wed Apr 14, 2004 11:33 am

Merge Header and Detail files

Post by marc_brown98 »

Hi All,
Just trying to get on what people think would be a good perfoming way to merge header and detail files together. I was thinking about going the merge stage route, but thought hash files would be a better performing solution because only a couple of fields from the header file make it to the output. The initial loads would be a fairly high record count, around 40 mil. detail recs, but ongoing/incremental recs would be low, in the 100k range for detail. Thoughts?

Cheers,
Marc
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

I assume there is something in your detail file that lets you join it to a header file such as a unique ID field. Make your smaller file a hash file lookup, in this case put your header file into a hash file making the ID field the key. Process your detail file and lookup the matching header file. You can then output a record with both header and detail fields.

I wouldn't try to merge your header and detail records as they are likely to have different column definitions, a join will be much easier then a merge.
Post Reply