I am reading data from a source in the Data Flow tab.
The data is put through a Conditional Split
Order 1 -> ColA = "Y"
Order 2 -> ColB = "Y"
If the Default output condition gets hit, being neither ColA or ColB = "Y"... then I want to throw an exception / error so that it hits the "Fail Component" block.
Pick your poison and connect it to the Default output.
The quick and dirty is to attach a Derived Column Transformation and force a division by zero error.
My preference is to route to a Script component. In the script component, I pass in the business keys of the rows as ReadOnly. For each row I see, I raise a Warning event so I have record of all the "bad" rows. In the PostExecute method, if any rows had been sent the component, I then raise the OnError event to force the Data Flow to report an error back to the control flow. This will satisfy your need for a control to switch to the "Fail Component block" and you will be armed with sufficient information in your logs to research the skunky data.
You are logging, right? (the answer is yes. If you aren't make it so :D)
Below is code I use when a lookup fails. My business keys are Employee ID and Effective date so I add them to a list in the ProcessInput method and then in the PostExecute I fire off the Warnings/Errors. You could just as easily raise the Warnings in the ProcessInput method and set a flag in there to signal the PostExecute that it needs to error out.