Page 1 of 1

Data loading in main and detail table

Posted: Tue Dec 30, 2003 4:10 am
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

Posted: Tue Dec 30, 2003 7:08 am
by kcbland

Posted: Tue Dec 30, 2003 8:08 pm
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

Posted: Tue Dec 30, 2003 8:43 pm
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.