Reputation: 6505
I have an SSIS (2005) package that transforms some XML data and then imports it into SQL 2005. The column that the data goes to is nvarchar(max). The length of the data varies between 500 chars and 750 chars. When viewing the XML file that get created for import after the transform (XSLT) in Notepad ++ it is not truncated. the very next step in the package is the import to SQL Server. The data in the table after the import get truncated to about 450 or so chars. I know that in query analyzer you may not see all the data so I generated a script using SQL MGT Studio to script the table and the data and then viewed that in Notepad ++ and sure enough - the data had been truncated.
The SSIS package uses an XML Datasource to grab the transformed file. A Data Conversion (non-unicode to unicode for the nvarchar(max)) and an OLE DB Destination.
Upvotes: 1
Views: 1183
Reputation: 1618
You can also tell the component to ignore truncation by double clicking the XML source editor, selecting Error Output & set truncation to "ignore failure".
I find this useful for elements that I'm not even going to use in my data flow, one less thing to go wrong.
Re-sizing the data is the better option if you want to use column in your data flow.
Upvotes: 0