BookmarkSubscribeRSS Feed
MG18
Lapis Lazuli | Level 10

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 .

 

3 REPLIES 3
kiranv_
Rhodochrosite | Level 12

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

 

Rama_V
Obsidian | Level 7

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,

LinusH
Tourmaline | Level 20

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.

Data never sleeps

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to connect to databases in SAS Viya

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.

Discussion stats
  • 3 replies
  • 1170 views
  • 2 likes
  • 4 in conversation