BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JJP1
Pyrite | Level 9

Hi Team,

Would you please help on i ran the lookup transformation in SAS DI.the job log is showing  below note.

would you please suggest on below note in log .... what does it mean please

 

Query over :
NOTE: There were 39432 observations read from the data set test
Source records with errors: 27360
Total lookup exceptions: 27360

Why are these suggesting source record errors?please help

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

@JJP1 

Look into the generated SAS code and things will become clear.

These are the number of rows in your source table where there hasn't been a matching record in the lookup table.

 set <source table> end = eof;
.....
/* Examine success of lookups  */
   if ( rc0=0 ) then
   do;
      /* Write row to target  */
      output ...;
      return;
   end;
   else
   do;
      error_total + 1;
      ....
   end; /* One or more lookups failed */

   if (eof = 1) then
   do;
      put "Source records with errors: " error_total ;
      put "Total lookup exceptions: " exception_total ;
   end; 

If you also define an error and exception table then that's where such things get captured. 

View solution in original post

3 REPLIES 3
Patrick
Opal | Level 21

@JJP1 

Look into the generated SAS code and things will become clear.

These are the number of rows in your source table where there hasn't been a matching record in the lookup table.

 set <source table> end = eof;
.....
/* Examine success of lookups  */
   if ( rc0=0 ) then
   do;
      /* Write row to target  */
      output ...;
      return;
   end;
   else
   do;
      error_total + 1;
      ....
   end; /* One or more lookups failed */

   if (eof = 1) then
   do;
      put "Source records with errors: " error_total ;
      put "Total lookup exceptions: " exception_total ;
   end; 

If you also define an error and exception table then that's where such things get captured. 

JJP1
Pyrite | Level 9

Thanks @Patrick & @Kurt_Bremser for guiding me

sas-innovate-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

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
  • 1778 views
  • 2 likes
  • 3 in conversation