I have an SSIS project that calls a web service and returns the data in the form of an xml document. Next, I need to parse that xml in a data flow task and load it into a sql server database.
The xml file has an inline schema. In my XML Source in the data flow, I select "inline schema" and all of the columns are listed correctly. Everything seems fine up to this point.
However, when I execute the package, no data is being loaded from the xml source and no errors are thrown. The output message says "'OLE DB Destination wrote 0 rows'". My data viewer does not show any data being piped out of the xml source, (same problem, no data is written and no errors are thrown).
Below is an excerpt from my xml source with an inline schema, which is created by my web service task.
Please suggest how can I load xml data into sql server using ssis.
Here is a sample of the xml file:
<DataSet>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" />
<xs:element name="author" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet>
<Table diffgr:id="Table1" msdata:rowOrder="0">
<title>The Lord of the Rings</title>
<author>J.R.R. Tolkien</author>
</Table>
<Table diffgr:id="Table2" msdata:rowOrder="0">
<title>The One You Cannot Have</title>
<author>Preeti Shenoy</author>
</Table>
</NewDataSet>
</diffgr:diffgram>