Data loading in main and detail table

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
girishoak
Participant
Posts: 65
Joined: Wed Oct 29, 2003 3:54 am

Data loading in main and detail table

Post by girishoak »

Hi,

I want to load the master table as well as detail table. Details table contains foreign key whose primary key is in main table. Also, the I want to create primary key (can be numeric value, I dont mind) in main table dynamically while loading the data in main table. In that case I have to use the same value while loading the data in details table.

Can anybody tell what approach should I adopt in datastage :?: any tips :?:

Thanks in advance

Girish Oak
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
girishoak
Participant
Posts: 65
Joined: Wed Oct 29, 2003 3:54 am

Post by girishoak »

Hi Ken,

Sorry to say but I have already gone through these topics before posting this topic. I dont want the concept, I want to know how we can hadle this through in datastage. Currently, I am doing data migration for my client. We have decided a deadline to migrate data as 31st Dec 03 after that we will load incremental data. So in this case, i want to know how can we use datastage for the same.

Please guide. I appreciate your work and time you have put in in writing those topics

Thanks in advance

Girish Oak
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

From what I understand you want to have the initial load done on 31 Dec (which it already is), and incremental loads from that point on.

Initial loads of master (or dimension) tables generate new surrogate keys, which you can use DataStage or a sequence or serial data type in the database server to accomplish.

Initial loads of the detail (or fact) tables needs a mechanism to match the true, or business, key in source data with the surrogate key in the target database. Usually you will pre-load a hashed file to perform this mapping.

Incremental loads of master (or dimension) tables will use any one of a number of techniques, depending on whether you're implementing type 1, type 2 or type 3 (or type "one and a half") slowly changing dimensions.

Incremental loads of the detail (or fact) tables needs a mechanism to match the true, or business, key in source data with the current surrogate key value in the target database. Usually you will pre-load a hashed file to perform this mapping.

You may need to handle the situation - which really shouldn't occur - that the master (or dimension) table was updated twice in the same incremental load.

Good luck! You really did leave it awfully late.
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