Hi, I'm new to SAS DI and I'm trying to build a simple ETL framework. I would like be able write audit information whenever a job is executed to an ODBC table. for example, the start and end times, the job name, and the status of the job on completion e.g. SUCCESS or FAILURE. I have done this in other ETL tools by creating a stored procedure at database level and calling them from the ETL tool. With DI this works perfectly to create the job audit record, but the problem I have is that if a transformation fails, then the NOEXEC option is set which is preventing the proc sql command to update the audit record with end timestamp and job status from running. Hopefully the attached screenshot explains what I'm trying to do. The logfile for the log job end transformation shows my ODBC stored procedure call not being executed because the error in the SCD 2 transformation has set the NOEXEC option 6125 proc sql;
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
6126
6127 connect to odbc (datasrc='fluxliner_repo');
NOTE: Statement not executed due to NOEXEC option.
6130
6131 execute(dbo.sp_package_end
6132 @batch_id = "&batch_id",
6133 @package_name = "&etls_JobName",
6134 @status = "&JOB_RC") by odbc;
NOTE: Statement not executed due to NOEXEC option.
6135
6136 disconnect from odbc;
NOTE: Statement not executed due to NOEXEC option.
6137
6138 quit;
NOTE: The SAS System stopped processing this step because of errors. I've tried things like adding the EXEC option to the proc sql call, and also RESET NOEXEC, but they don't seem to make any difference. I've also tried adding an erorr status handler to the SCD2 transformation which has an action of None in the hope that this would allow to SQL exec transformation to run but that doesn't help either.I'm not sure if I'm going about using the status handler in the correct way though. I'm using SAS DI 4.9.04. Thanks S.
... View more