July 4, 2016 at 11:43 am
Hello
I'm looking at using SSIS for a fairly basic (in the first instance) data transform that writes any rows with errors
In the past I've done this in an all or nothing approach to the extract itself (to a staging table) followed by T-SQL data verification to write to the main table (or error table)
Would now like to so all this via SSIS
I've been able to create a flow that reads a csv, writes to the 'correct' table where the record is ok and writes to the 'incorrect' table where it fails (simple primary key violation)
The problem I now have is that I'd like to see what ErrorCode means as this is just a number
How do you achieve this?
I've looked at https://msdn.microsoft.com/en-us/library/ms345163(v=sql.110).aspx plus a number of other examples but just can't seem to get it working
When I code it up as per the link step 8 it doesn't give me the option to define the type as String and increase the length
[p]8.On the Inputs and Outputs page, add a new output column of type String named ErrorDescription. Increase the default length of the new column to 255 to support long messages.[/p]
Step 4 just does not recognise ErrorDescription - I get an error that suggests the output column does not exists even though I have created it.
[p]Error21Validation error. Data Flow Task: Data Flow Task: The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully. [/p]
Beginning to bug me now as I've tried a number of alternatives and just can't get it working
Any thoughts please
Thanks
Damian.
- Damian
July 7, 2016 at 9:54 am
Look into the OnError Event Handler. I believe it has the variables you're looking for when it comes to verbose error messages.
I use that event handler all over my ETL packages so I get back what's actually wrong.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply