Solved

SSIS explicit data type in xsd

Posted on 2009-07-16
1
624 Views
Last Modified: 2013-11-10
Hi Experts,

Is it possible to explicitly name the data type in the xsd file to sql server data types? I have an xml source that I am putting through a lookup in SSIS. The lookup is reporting that the data type don't match with the table. The attribute in the xml file is a url with data type string, I've changed the table column data type to varchar(max), nvarchar(max), and text with no effect.

I'm now trying to set the data type in the xsd file by using the namespace

xmlns:dt="urn:schemas-microsoft-com:xml:datatypes"

<xs:element name="ItemURL" type="xs:string" dt:type="varchar" minOccurs="0"/>

Can I do something like dt:type="varchar"?

0
Comment
Question by:acclimate
1 Comment
 
LVL 9

Accepted Solution

by:
Hwkranger earned 500 total points
ID: 24882088
Yes you can.  

What I do though, is I used a "DERIVED COLUMN" or the "CONVERT DATA" tasks.  It's easier than working with the XSD in my opinion.  The XSDs are easily corrupted.  I use hundreds of them, and I find it's easier to manipulate the data afterwards rather than defining it in the XSD.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now