ssis and logging

  • I try to use for each loop reading several text files like dat1.txt,dat2.txt,dat3.txt... iand insert them into a sql server table and  whenever there is an error in the input data I would like to log them and find out what is the line numer and the input file name that had the error. When I looked at the log file it shows the line number but is does not tell me the file name.

    Would you you please help me in that.

    Thanks

     

  • The only real way is to add the field name (which you will have stored in a variable from the ForEach loop) as a new column using the Derived Column transform.

    Are you absolutely sure the line number is in there? There is no concept of line numbers in SSIS unless you explicitly add them in yourself.

    -Jamie

     

  • Hi Jamie,

    Would you please let me know how I can add the field name you mentiomd?

    Thanks

    Mark

  • Open up the derived column transform. In the top left segment expand variables and drag the variable you want into the lower window. That'll create an extra column with the variable value in it.

    -Jamie

     

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

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