Friday, February 24, 2012

Error catching in SSIS

I have a package that is failing parsing a CSV file. I want to write the failing line to an error file and continue processing. I've added error output to the flat file source, that didn't work. I've added an onerror event handler to the data flow task, that didn't work. I've added an event handler to the package, that didn't work. How can i output the offending line but not have the process fail?

Go to the Error Output page on the Flat File Source editor and set appropriate Error and Truncation values to Redirect. After this connect your error output to a Flat file destination where you can take care of erroneous rows.

Thanks,

Bob

|||Thanks, but that isn't it. I've got it set to redirect. The error is

Error: 0xC0202055 at Data Flow Task, Flat File Source [1]: The column delimiter for column "Column 3" was not found.

It is being caused by an embeded double quote in the source CSV file. It's escaped to "" and the parser blows up. It dosent go to the error output. and i can't seem to catch the error, it kills the process.

|||

The flat file parser cannot handle embedded quotes. You will have to load qualified data and post-process it using script or derived columns.

Thanks,

Bob

No comments:

Post a Comment