Page 1 of 1

Load a table with foreign constraints

Posted: Thu Aug 04, 2011 9:04 am
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

Posted: Thu Aug 04, 2011 9:46 am
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.