Hi All,
recently I have created one DI job which is having the table loader in the job and loading the data into the SAS data set but it is failing
with below mentioned warning :-
warning :-
Table Loader
Line 520: WARNING: Add/Update failed for data set SASWORK.FSK_RISK_ASSESSMENT_WORK because data value(s) do not comply with integrity constraint _NM0001_. (Occurred 73 times.)
Due to the same warning , data is not getting loaded into the SASWORK.FSK_RISK_ASSESSMENT_WORK data set.
Can somebody help on the same ? Many thanks in advance .
please check whether there are constraints on base table. you can use the bekow code or you can see them in DI
proc sql;
describe table constraints SASWORK.FSK_RISK_ASSESSMENT_WORK;
please check this link below which talk about this kind of errors
http://support.sas.com/kb/47/781.html
The Target table might have constraints as mentioned by @kiranv_ .
Most common, should work if you do as below.
If you are replacing target table completely then remove the constraints on target table column properties mostly "Is Nullable" to Yes.
or
Check the source table is doesn't have null values where Target table column has Nullable constraint then try avoid them.
Best Wishes,
Just want to add that constraints hopefully exist for a reason.
Don't remove them unless that has being cleared by an architect/DBA.
Contraints helps on keeping the data in good shape, and in an ideal world any data problem should be taken care of at the source, or when appropriate, by ETL/data governance process.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.