• bobd125 (12/5/2012)


    What is the best way to make your SSIS Data Flow to fail upon a data condition check. What I'm doing is reading a flat file that has both detail records (counting this up) and a single trailer record (that has number of details records sent). If the two values do not match then fail. I'm at the point where I have the two values (total detail records, and trailer detail record count) to compare. I have a derived column ((DT_I8)DETAIL_REC_CNT == (DT_I8)[INT_SENT-REC-SNT] ? TRUE : FALSE

    Upon the FALSE I want to Fail (stop the SSIS). I've only written a few SSIS's to date and have never dealt with ERROR path output. Is this how it's handled, and how?

    It sounds to me like you want to use a Conditional Split transformation. If the counts match, then continue your processing other wise send to another branch where you can log the error (or do whatever else you may need). You wouldn't need the Derived column transformation (unless you need that True/False value somewhere farther down in your processing) using the conditional split.

    http://www.bimonkey.com/2009/06/the-conditional-split-transformation/

    HTH,

    Rob