Load a table with foreign constraints

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
babbu9
Premium Member
Premium Member
Posts: 75
Joined: Tue Jun 01, 2004 9:44 am

Load a table with foreign constraints

Post by babbu9 »

Hi
I am working on loading an SQL SERVER table that has foreign key constraints on it. The job is failing because some of the data does not meet the constraints. How can we continue to load even if there a few failures during the load?

I have not encountered any solution to this problem using datastage. This is important because we will be loading a relational model and we have some data quality issues, but we must load atleast some of the data into the model.

Please inform.

Babu
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you want to load what you can, prequalify your data. Do lookups against your parent tables and only send to the target rows you know will not violate any constraints. That way you can also capture any of these 'data quality issues' in a more graceful manner rather than waiting for the DB to spit them back at you.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply