all groups > sql server dts > july 2007 >
You're in the

sql server dts

group:

error column


error column farshad
7/30/2007 12:02:00 AM
sql server dts:
Hi,
Using SSIS, while importing (source i.e. .csv into destination i.e. sql
server table), how is it possible to log the source COLUMN which causes the
error in the row?

RE: error column Todd C
7/30/2007 5:38:01 AM
Hello again;

In your Data Flow, set up a Text File destination near the regular OLE Db
destination. Grab the RED arrow FROM the OLE Db destination and drop it onto
the new Text file dest. Configure your error output to re-direct rows.
Configure the Text File destination to map all columns INCLUDING two new ones
that will be added (because it is connected to the 'error' flow) called
ErrorCode and ErrorColumn. Note: The OLE DB Destination CANNOT use Fast Table
Load, you must use normal table load if you want to re-direct error rows!

Now, if any rows don't make into the OLE Db, they will get recorded to the
text file.
Open that file and examine its contents. Hopefully you have some kind of key
field to zero in on the problem record. Examine the LAST column:
"ErrorColumn" Note that it is an integer. What's up with that? To de-cipher
that, you must look back at the package, in the Data Flow. Right-click on the
OLE Db Destination, and select Show Advanced Editor. Go to the Input and
Outpout Columns tab. Expand the OLE Db Destination Input node, then the Input
Columns node under that. Scroll dowm the list until you see a column with an
ID property that matches that captured.

(Yeah, I know, I too wish that it would record the offenting column NAME
instead off some property burried deep within the package)

HTH

--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


[quoted text, click to view]
AddThis Social Bookmark Button