Need to reject file if there is any Error Output

  • Hi,

    My Package is for loading the bunch of flat files from folder to table.

    Can any one tell me how to reject complete file if there is any error output redirected while continue the excecution of package by taking nxt file.

    Thanks,

    V.K

  • Put a rowcount component on the error redirection.

    If the count > 0, take some action right after the dataflow. (use an expression on the precedence constraint)

    E.g. delete the file, delete the inserted rows, whatever.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Only suggestion I have is to load the data into a temporay table. If you have any errors during the load, truncate the table and go get the next file. If no errors, move the data from the temporary table to the targat table. May require an extra step, but it insures no data is updated in the target if there are problems processing the file.

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

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