question

pjones avatar image
pjones asked

SSIS XML Data Source not getting columns

I am trying to import a simple XML file using the SSIS XML datasource. I have generated the XSD for but when I go to the columns page it will not generate the columns and just shows no columns and does not give any error. I have successfully done this with a more complex xml file in the past and that still works fine but this new one won't work. Please can anyone see the problem?
XML file is

<?xml version="1.0" encoding="UTF-8"?>

<Read>

<UserId>00000000-0000-0000-0000-000000000000</UserId>

<UserName>ABC</UserName>

<Date>05/11/2020</Date>

<Time>11:51:45</Time>

</Read>

and XSD file is

<?xml version="1.0"?>

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">;

<xs:element name="Read">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="UserId" type="xs:string" />
<xs:element minOccurs="0" name="UserName" type="xs:string" />
<xs:element minOccurs="0" name="Date" type="xs:string" />
<xs:element minOccurs="0" name="Time" type="xs:time" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Once I get this working I have some more fields to add in the xml including a base64Binary image field but the whole files are only around 90kb.
I'm using SSDT for Visual Studio 2017 and the dest server is SQL Server 2016 at present though may become 2017.

Any help welcome to save my sanity.

ssisdata source
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.