Constraint based laoding

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
srekant
Premium Member
Premium Member
Posts: 85
Joined: Wed Jan 19, 2005 6:52 am
Location: Detroit

Constraint based laoding

Post by srekant »

How can i achieve constraint based laoding using datastage7.5 EE .My target tables have inter dependencies i.e Primarykey foreign key constraints.I want my primary key tables to be loaded first and then my foreign key tables and also primary key tables should be committed before the foreign key tables are executed.How can i go about it.
Sree
ram1899
Charter Member
Charter Member
Posts: 41
Joined: Wed Aug 04, 2004 11:46 am

Re: Constraint based laoding

Post by ram1899 »

srekant

Create a Job Sequencer Job to load you tables in Sequential mode
In the sequencer Call all you Primary Key tables loading Jobs first and followed by Foreign key tables, when triggering the Foreign tables load Job trigger them only when Primary Key load Jobs run Succesfully ( i.e OK trigger)

Hope this will help you
Thank you

srekant wrote:How can i achieve constraint based laoding using datastage7.5 EE .My target tables have inter dependencies i.e Primarykey foreign key constraints.I want my primary key tables to be loaded first and then my foreign key tables and also primary key tables should be committed before the foreign key tables are executed.How can i go about it.
ram1899
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You want the parent tables (operational masters) loaded first, you design your job sequence so that they are loaded first. Then, once they're all done (which you can enforce using an "All" Sequencer), you can load the tables that refer to them (the operational details). It's really that simple.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mujeebur
Participant
Posts: 46
Joined: Sun Mar 06, 2005 3:02 pm
Location: Philly,USA

Post by mujeebur »

To improve the performace of the Job , you can disable all the constraints on the tables and load them. Once loading done , check for the integrity of the data . which does not meet raise expetional data ans cleanse them.

This only a suggestion , normally when loading on constraints are up , will drastically peformace will go down.

-Mujeeb.
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

If you use Star schema modelling, when you create physical DB from the model, you can delete all constraints and the referential integrity would be maintained in the ETL process by referring all your dimension keys while loading fact tables. Once all dimensional keys are assigned to a fact then dimension and fact can be loaded together. At the same time RI is being maintained at ETL process level.

Regards
Saravanan
Post Reply