开发者

SSIS XML Source, no output although using inline xsd schema

I have an xml file with some data and inline schema attached to it. If i use it in SSIS (2008 or 2005) xml source component, I get no output to any destination (tried, raw file, flat file, excel, ole db, db destination).

The columns come up just fine, mapping in the following component (e.g. db destination) seems to work, mappings ok.

Then if I run the ssis package, checks are ok, tests are ok, everything in "green", but finally 0 rows written to the destination... ;(

I've researched this quite a bit, there are cases about missing columns, data type conversion, s开发者_StackOverflowchema issues (I have a valid inline schema) etc.

Here is an example with dummy data, there are 5 other schemas with plenty of more columns..

<?xml version="1.0" encoding="utf-16"?>
<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="CompanyNameID" type="xs:int" minOccurs="0" />
                <xs:element name="Name" type="xs:string" minOccurs="0" />
                <xs:element name="Description" type="xs:string" minOccurs="0" />
              </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">
        <CompanyNameID>1</CompanyNameID>
        <Name>a</Name>
        <Description />
      </Table>
      <Table diffgr:id="Table2" msdata:rowOrder="1">
        <CompanyNameID>7</CompanyNameID>
        <Name>b</Name>
        <Description />
      </Table>
      <Table diffgr:id="Table3" msdata:rowOrder="2">
        <CompanyNameID>6</CompanyNameID>
        <Name>c</Name>
        <Description />
      </Table>
    </NewDataSet>
  </diffgr:diffgram>
</DataSet>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜