SNag
SNag

Reputation: 18151

SSIS - Continue Package Flow even after inner task in a Foreach Loop Container fails

In the figure below, why is the Foreach Loop Container failing despite the fail path (of the DFT that failed) being handled correctly?

How can I get the loop to continue after handling fail path?

enter image description here

If it helps to know what's going on in the package, here's the gist:

We have a requirement where data from Excel files must be loaded into a DB. The package we have splits each Excel file into constituent CSV files (one CSV per sheet), and loads the CSVs into the DB. It is possible that some of the sheets have issues (missing columns, data type mismatch etc), and such erroneous CSVs are captured by the fail path of the DFT. Ideally the package must resume processing the rest of the CSVs, and the rest of the Excel files, and exit successfully.

Upvotes: 6

Views: 21627

Answers (2)

user1826905
user1826905

Reputation: 568

Do you have any OnError EventHandlers defined for that Data Flow Task? If yes, you could as well set the System Variable, Propogate (type Boolean), for that Error Handler scope to 'False'.

Also please go through Gracefully Handing Task Error in SSIS Package

Upvotes: 10

Dominic Goulet
Dominic Goulet

Reputation: 8113

There is a property on every SSIS component that is called MaximumErrorCount which defines the number of errors that this particular component can accept before failing the whole package.

You have to increase this value for each and every component that you want to continue executing before failing.

Upvotes: 2

Related Questions