07-31-2012 02:16 PM
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.
08-01-2012 05:13 AM
You can try using following ...
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...
08-01-2012 08:11 AM
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.
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.