BookmarkSubscribeRSS Feed
kandasamy
Calcite | Level 5

Hi,

As per our requirement we need to capture the each transformation error and we need to log it to the Error Table.

Please guide me how to get the Transformation error Code from the SAS DI tool.

I am using SAS DI 4.21 version tool.

Thanks!

Regards

Kandasamy

3 REPLIES 3
art297
Opal | Level 21

The following paper might contain what you need:

http://analytics.ncsu.edu/sesug/2007/AD10.pdf

shivas
Pyrite | Level 9

Hi Kandasamy,

You can try using following ...

1)Status handling

2)As status handling tab is not present in some of the transformation,you can use Return code check transformation for capturing error code.

3)You can also write user written code.

Hope this helps...

Thanks,

Shiva

Patrick
Opal | Level 21

Make sure that you understand the requirement correctly! SAS DI studio let's you create a job flow as SAS Metadata. Based on this metadata SAS code gets generated. What will be executed is SAS code.

If SAS code throws an error (eg. there is a syntax error in a expression defined in a transformation) then it's kind-of too late to try and capture this error and write it to an error table (as this capturing code would come after the error occured). A syntax error is a syntax error - how code behaves after that is unpredictable.

What you can do is define conditions (eg: lookup table does not exist) and actions (eg. logging the condition in an error table).

Thanks for the question! I didn't realize what the Return Code Check transformation is used for. Was good to have a read in the docu.

http://support.sas.com/documentation/cdl/en/etlug/60948/HTML/default/viewer.htm#p0ygtz7di8z8kpn1ufnc...

http://support.sas.com/documentation/cdl/en/etlug/60948/HTML/default/viewer.htm#n13t3zm3lp6u7dn15a8k...

The paper Art posted: That could be a way to capture rejected rows when loading into a SAS dataset with integrity constraints turned on (using audit trails: http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a001224397.htm) I personally feel that when this level of control is needed then it's possibly time to think about loading data into a data base like Teradata or Oracle.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1310 views
  • 0 likes
  • 4 in conversation