December 1, 2008 at 6:31 am
Afternoon,
The XML Source Adapter in SSIS has made my life very easy when importing Data for a project I have been working on. However, I am running into a problem in regards to the length of the 'String' type in the Xml Schema Definition file and how this is recognised in SSIS.
Basically, a 'content' attribute within the Article XML file I am using to import is often greater than 4,000 characters. I've previously created a new restriction with the Facet 'maxLength = 8000' but as the following link says SSIS defaults the length to 255 if no maxLength is given: "if a string has a length of 5000, it is truncated to 4000 characters because the maximum length of the DT_WSTR data type is 4000 characters; likewise, byte data is truncated to 8000 characters, the maximum length of the DT_BYTES data type. If the schema specifies no maximum length, the default length of columns with either data type is set to 255"
http://msdn.microsoft.com/en-us/library/ms140277(SQL.90).aspx
So basically I am currently limited to loading up to (and including) 4,000 characters of data in this attribute. This causes a few concerns because I do still want to import the longer articles of text within the XML file. Is there a way round the max Length in SSIS? You can use a DT_NTEXT data type in SSIS but how do you reflect this change in the .xsd file so that SSIS recognises this and allows you to not truncate any data?
Thanks in advance,
Dan
December 2, 2008 at 10:07 am
Well, I managed to get around the problem with help from Roger Doherty from the following link: http://blogs.msdn.com/rdoherty/archive/2005/03/16/396956.aspx
Didn't realise you could change the input/output of the task in Advanced Editor!
So hope this helps out others if they ever come across a similiar situation (and not just with XML files) 😎
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply