Regarding Error handling in SSIS

  • I am new to this SSIS package stuffs and haven't worked in SSIS... Had a requirement where in i've to read a flat file for employees and put it in to a staging table. I have done this using the Flat file source and OLEDB connection in SSIS 2008. The thing i want to know is

    1)When i import data from the flat file, if there is any empty column in the file for a employee then have to move those records to a new flat file and process the rest of the rows and import it to the staging table.

    2) If there is any error while reading the file then have to move only those records to another flat file and process the rest of the records.

    Please do help me in this regards since its urgent

    Thanks in advance for the help.

  • You can test column values with a conditional split data flow transformation. Based on the evaluation of your split condition, you can re-direct rows to another destination.

    For example, the evaluation in the attached graphic, which looks for empty string claim IDs or sub IDs in source data is as follows:

    Output Name Condition

    NullClaim LEN(TRIM(ClaimID)) == 0 || LEN(TRIM(SubID)) == 0

    Those that meet this criterion are directed into the right-hand data flow for further processing, and those that have values are directed into the staging table.

    I hope this helps.

  • Thanks, smith this helped me a lot...:). Than was greatful.

    I have some queries regarding error handling like some errors while processing the file which i've to log in a file... The scenario is

    In the file to be processed i have 'n' number of records for an employee and have any number of employees. While processing the file if there is an error for a particular record i have to delete all the records inserted in to the db of that employee and write those records in to a file. Can you suggest me some way to do this.

    Thanks in advance.

    Sriram

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

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