There is a build-in function for, which you can use.
See
Lesson 4-3: Add error flow redirection
Error Handling in Data
Error handling in Script component at validation process in SSIS
Hi All,
I am facing below issue can somebody help me.
I have a package for loading data from multiple CSV to SQL Server. Package is already developed now i have to do Error handling. I am using below Steps.
1) we are using For each container for getting CSV file.
2) Then Script component for handling the Source(CSV) file then OLEDB Destination to Load into SQL Server DB.
3) Now i want to do error handling in Script Component also. I am getting truncation error at Script Component Validation time for some record from CSV File and package is going to failed. I want my package should not failed and redirect that data into Error Table and then continue for others record.
2 answers
Sort by: Most helpful
-
Olaf Helper 45,391 Reputation points
2022-02-08T14:44:25.93+00:00 -
ZoeHui-MSFT 39,496 Reputation points
2022-02-09T02:35:48.353+00:00 Hi @Abhishek Sharma ,
Although you cannot directly configure an output as an error output in the Script component for automatic handling of error rows, you can reproduce the functionality of a built-in error output by creating an additional output and using conditional logic in your script to direct rows to this output when appropriate.
Please refer to simulating-an-error-output-for-the-script-component.
Regards,
Zoe
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.