使用SSIS 2008批量插入多个XML文件 [英] Bulk Insert Multiple XML files with SSIS 2008
问题描述
我有一个包含多个XML文件的文件夹。我需要将每个批量插入SQL Server的表中。我完全不知道如何使它工作,因为我是SSIS的新手。
I have a folder with multiple XML files. I need to bulk insert each one into a table in sql server. I am at a complete loss as to how to get this to work, as I am new to SSIS.
当前,我的SSIS软件包将文件从FTP服务器中拉出,使用命令行解压缩xml(称为.xml.gz)。这一切都很好,但是现在让我不知所措,因为将文件插入数据库中,因为批量插入任务只需要分隔文件。
Currently, My SSIS package pulls the files off an FTP server and uses a command line to unzip the xml (the come as .xml.gz). This all works great, but now I'm at a loss as to get the files into the database, as the bulk insert task only takes delimited files.
建议?
推荐答案
您可以通过使用 ForEach循环容器,带有文件的枚举器类型。如果XML文件很复杂,则可以使用 XML任务。否则,请使用具有 XML源的数据流。
You can accomplish this by using a ForEach Loop Container with an enumerator type of file. If the XML files are complex, you can use an XML Task. Otherwise, use a Data Flow with an XML Source.
如果您选择这样做,则以下文章解释了如何使用XML源。
If you choose to do so, the following article explains how to use an XML Source.
这篇关于使用SSIS 2008批量插入多个XML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!