I have a SSIS package which contains a sequence container holding 2 tasks
1. Execute sql task
Which executes a sql script loading child and parent in a o/p table .Whenever child =parent it goes up and gets the next parent using recursive update
2. Create csv file task using the o/p table created in the above task.The o/p table is truncated before every load
In the Execute sql task ,I have a recursive update .
3.There is no file archiving in place for the CSV file
4.There is no audit history of the output table
5.No error notification
The problem right now I am having is the recursive update is failing and we are not getting notified.When we have looked into the issue with more detail we have found the issue happens when the lookup condition in recursive update doesnt get any value.
i.e when it expected a value during lookup it didnt get a value and it completes with a error message .
(136 row(s) affected)
Msg 245, Level 16, State 1, Line 333
Conversion failed when converting the varchar value 'kv1234' to data type int.
When we digged furhter in we found the source table for the look up condition was not having the required value.
The execute sql task completes with no failures recorded in the job and the output table and csv file are populated with whatever data it got till the failure.
So my expert friends please suggest me a solution which you think I should implement.
The solution should notify the failure and pick the column or record which is the cause for the failure.
The file which generated with no issues must be archived at the end of the load.