2

I have a Conditional Split task in my workflow which directs the data to one of three different destinations.

All my data should go to one of these three destinations. If there is data that does not conform to this rule it should cause the process to fail (i.e. nothing gets Loaded and the user is given an error).

Is there any way in SSIS to cause a Conditional Split task to fail the process if data is sent to its default output?

Hadi
  • 31,125
  • 9
  • 49
  • 111
Hoppy
  • 668
  • 2
  • 9
  • 23
  • You could use a Custom data flow component as a destination of the default output and raise an error if any rows are passed in. – Martin Smith Feb 04 '18 at 23:18
  • Are you interested in what this bad data is? You could load it into a logging table and fail if any records appear there – Nick.McDermaid Feb 04 '18 at 23:29

1 Answers1

3

The most simple way to do that is to add a Script Component (Destination) after the Default Output. And Throw an exception from the Script Component. As example (VB.NET)

Throw new Exception("Condition are not met!")
Hadi
  • 31,125
  • 9
  • 49
  • 111