Dataflow task -> Error Handling

  • Hi,

    In terms of data flow tasks, when say we load text files into databases.

    Is it possible to have it in a way so that if a certain record (line in the text file) fails to load due to watever reason, it gets written to another table, but the rest of the records still get loaded?

    I try to do so and end up with the whole data flow task failing and it stalls at the record that had the error and doesn't seem to continue forward.

    I just used the red arrow (on failure) and put that to another SQL destination object. But yeah that didnt work. I had the error output columns error code and column set to go to my table, and the error action was set to 'Redirect Row'. What it still did was it copied the rows till the bad row and then gave the "GREEN" box for the flat file source and the bad data destionation object, but gave the "RED" box for the actual destination.

    When i checked later, it just had the first few rows before the error row in the main table and still had nothing in the table where i wanted to store the error code and column.

    If someone has a better way of doing so, would be awesome if you can share that.

    Cheers

  • You're sort of on the right track.

    You need to use the error output for each component in the data flow. That's the red line. You also need to ensure that the error handling property for that component is set to redirect errors.

    Pretty much all components have an error output and you can do what you want with the resultant rows.

    The also introduce additional columns which contain the error description.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • Oh.. i didnt know i needed the error output for each component. I tried just for the text file source previously...this time i did it with the DB destination and it worked fine. Cheers.

    Just wondering though, what does the Error Column value indicate? cos it indicated to me column 100 when i only had the one column in my source.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply