运行VS2015(SSDT)和SQL Server 2014.我是SSIS / XML的新手,我正在尝试使用Web服务,它允许我在Web服务任务中选择2种方法:ExportDataset和ExportXML。我正在尝试将此数据写入带有ID
int列的SQL Server表。 Web服务任务输出到文件。
当我从文件中将生成的ExportDataSet xml输入“XML Source”时,我可以使用内联架构,选择和映射列,并输出到OLE DB数据库。但是在执行包时会写入0行。
当我从文件中将生成的ExportXML xml输入“XML Source”时,没有架构,“Generated XSD”选项不会在Mapping部分中给出任何列,因此无法执行包。
我错过了什么?我可以使用哪种XML / XSD?
ExportDataset 生成的代码:
<?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="id" type="xs:short" 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">
<id>2</id>
</Table>
<Table diffgr:id="Table2" msdata:rowOrder="1">
<id>3133</id>
</Table>
<Table diffgr:id="Table3" msdata:rowOrder="2">
<id>3134</id>
</Table>
<Table diffgr:id="Table4" msdata:rowOrder="3">
<id>3135</id>
</Table>
<Table diffgr:id="Table5" msdata:rowOrder="4">
<id>3157</id>
</Table>
<Table diffgr:id="Table6" msdata:rowOrder="5">
<id>3183</id>
</Table>
<Table diffgr:id="Table7" msdata:rowOrder="6">
<id>3263</id>
</Table>
<Table diffgr:id="Table8" msdata:rowOrder="7">
<id>3291</id>
</Table>
<Table diffgr:id="Table9" msdata:rowOrder="8">
<id>3292</id>
</Table>
<Table diffgr:id="Table10" msdata:rowOrder="9">
<id>3371</id>
</Table>
<Table diffgr:id="Table11" msdata:rowOrder="10">
<id>3429</id>
</Table>
<Table diffgr:id="Table12" msdata:rowOrder="11">
<id>3431</id>
</Table>
<Table diffgr:id="Table13" msdata:rowOrder="12">
<id>3439</id>
</Table>
<Table diffgr:id="Table14" msdata:rowOrder="13">
<id>3455</id>
</Table>
<Table diffgr:id="Table15" msdata:rowOrder="14">
<id>3473</id>
</Table>
<Table diffgr:id="Table16" msdata:rowOrder="15">
<id>3476</id>
</Table>
<Table diffgr:id="Table17" msdata:rowOrder="16">
<id>3496</id>
</Table>
<Table diffgr:id="Table18" msdata:rowOrder="17">
<id>3518</id>
</Table>
<Table diffgr:id="Table19" msdata:rowOrder="18">
<id>3520</id>
</Table>
<Table diffgr:id="Table20" msdata:rowOrder="19">
<id>3549</id>
</Table>
<Table diffgr:id="Table21" msdata:rowOrder="20">
<id>3570</id>
</Table>
<Table diffgr:id="Table22" msdata:rowOrder="21">
<id>3571</id>
</Table>
<Table diffgr:id="Table23" msdata:rowOrder="22">
<id>3573</id>
</Table>
<Table diffgr:id="Table24" msdata:rowOrder="23">
<id>3582</id>
</Table>
<Table diffgr:id="Table25" msdata:rowOrder="24">
<id>3589</id>
</Table>
<Table diffgr:id="Table26" msdata:rowOrder="25">
<id>3607</id>
</Table>
<Table diffgr:id="Table27" msdata:rowOrder="26">
<id>3609</id>
</Table>
<Table diffgr:id="Table28" msdata:rowOrder="27">
<id>3610</id>
</Table>
<Table diffgr:id="Table29" msdata:rowOrder="28">
<id>3616</id>
</Table>
<Table diffgr:id="Table30" msdata:rowOrder="29">
<id>3618</id>
</Table>
<Table diffgr:id="Table31" msdata:rowOrder="30">
<id>3630</id>
</Table>
<Table diffgr:id="Table32" msdata:rowOrder="31">
<id>3632</id>
</Table>
<Table diffgr:id="Table33" msdata:rowOrder="32">
<id>3633</id>
</Table>
<Table diffgr:id="Table34" msdata:rowOrder="33">
<id>3801</id>
</Table>
<Table diffgr:id="Table35" msdata:rowOrder="34">
<id>3802</id>
</Table>
<Table diffgr:id="Table36" msdata:rowOrder="35">
<id>3803</id>
</Table>
<Table diffgr:id="Table37" msdata:rowOrder="36">
<id>3804</id>
</Table>
<Table diffgr:id="Table38" msdata:rowOrder="37">
<id>3810</id>
</Table>
<Table diffgr:id="Table39" msdata:rowOrder="38">
<id>3815</id>
</Table>
<Table diffgr:id="Table40" msdata:rowOrder="39">
<id>3816</id>
</Table>
<Table diffgr:id="Table41" msdata:rowOrder="40">
<id>3817</id>
</Table>
<Table diffgr:id="Table42" msdata:rowOrder="41">
<id>3822</id>
</Table>
<Table diffgr:id="Table43" msdata:rowOrder="42">
<id>3823</id>
</Table>
<Table diffgr:id="Table44" msdata:rowOrder="43">
<id>3824</id>
</Table>
<Table diffgr:id="Table45" msdata:rowOrder="44">
<id>3825</id>
</Table>
<Table diffgr:id="Table46" msdata:rowOrder="45">
<id>3826</id>
</Table>
<Table diffgr:id="Table47" msdata:rowOrder="46">
<id>3827</id>
</Table>
<Table diffgr:id="Table48" msdata:rowOrder="47">
<id>3828</id>
</Table>
<Table diffgr:id="Table49" msdata:rowOrder="48">
<id>3829</id>
</Table>
<Table diffgr:id="Table50" msdata:rowOrder="49">
<id>3830</id>
</Table>
</NewDataSet>
</diffgr:diffgram>
</DataSet>
ExportXML 生成的代码:
<?xml version="1.0" encoding="utf-16"?>
<string><NewDataSet>
<Table>
<id>2</id>
</Table>
<Table>
<id>3133</id>
</Table>
<Table>
<id>3134</id>
</Table>
<Table>
<id>3135</id>
</Table>
<Table>
<id>3157</id>
</Table>
<Table>
<id>3183</id>
</Table>
<Table>
<id>3263</id>
</Table>
<Table>
<id>3291</id>
</Table>
<Table>
<id>3292</id>
</Table>
<Table>
<id>3371</id>
</Table>
<Table>
<id>3429</id>
</Table>
<Table>
<id>3431</id>
</Table>
<Table>
<id>3439</id>
</Table>
<Table>
<id>3455</id>
</Table>
<Table>
<id>3473</id>
</Table>
<Table>
<id>3476</id>
</Table>
<Table>
<id>3496</id>
</Table>
<Table>
<id>3518</id>
</Table>
<Table>
<id>3520</id>
</Table>
<Table>
<id>3549</id>
</Table>
<Table>
<id>3570</id>
</Table>
<Table>
<id>3571</id>
</Table>
<Table>
<id>3573</id>
</Table>
<Table>
<id>3582</id>
</Table>
<Table>
<id>3589</id>
</Table>
<Table>
<id>3607</id>
</Table>
<Table>
<id>3609</id>
</Table>
<Table>
<id>3610</id>
</Table>
<Table>
<id>3616</id>
</Table>
<Table>
<id>3618</id>
</Table>
<Table>
<id>3630</id>
</Table>
<Table>
<id>3632</id>
</Table>
<Table>
<id>3633</id>
</Table>
<Table>
<id>3801</id>
</Table>
<Table>
<id>3802</id>
</Table>
<Table>
<id>3803</id>
</Table>
<Table>
<id>3804</id>
</Table>
<Table>
<id>3810</id>
</Table>
<Table>
<id>3815</id>
</Table>
<Table>
<id>3816</id>
</Table>
<Table>
<id>3817</id>
</Table>
<Table>
<id>3822</id>
</Table>
<Table>
<id>3823</id>
</Table>
<Table>
<id>3824</id>
</Table>
<Table>
<id>3825</id>
</Table>
<Table>
<id>3826</id>
</Table>
<Table>
<id>3827</id>
</Table>
<Table>
<id>3828</id>
</Table>
<Table>
<id>3829</id>
</Table>
<Table>
<id>3830</id>
</Table>
</NewDataSet></string>