In SSIS when we
will use data source as XML Source and if will generate a XSD file and click on
Mapping tab or OK button we may get warning message like:
No maximum length was specified for the output column ""
with external data type System.String. The SSIS Data Flow Task data type
"DT_WSTR" with a length of 255 will be used.
Cause: In your
XSD file either generated by SSIS or created by you, doesn't specify the max
length of XML tag or attribute of type string. So SSIS use default value that
is 255.
Solution:
1. If max length of string i.e.
255 is sufficient for you then click on OK button.
2. If you want increase or
decrease the max of string then you have to edit your .xsd file as follow:
Replace the each element and
specify minLenght and maxLength according to your requirement:
Initially:
<xs:element minOccurs="0" name="phone" type="xs:string" />
Now:
<xs:element minOccurs="0" name="phone" >
<xs:simpleType>
<xs:restriction
base="xs:string">
<xs:minLength
value="0"/>
<xs:maxLength
value="4000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Note: Change the name =
"phone" attribute to your element name.
1 comment:
Hi,
Thanks for the post but I need to ask you one query as I working on large set of text data which goes like more than 5K words not characters. The "" has a limit of 4K characters. How can I raise it to more than 20K characters?
Post a Comment