使用 SSIS 分解数据库中的 XML
我正在寻找一种从 SQL 数据库中提取 XML 并通过 SSIS 批量分解 XML 的方法。我目前有一个包,可以从数据库中提取 XML 并通过变量将 XML 传递到存储过程以进行粉碎,但这一次只能处理 1 条记录。当处理 100,000 条记录时,这可能会变得相当耗时。
我想使用 SSIS 一次分解多个 XML 值。 SSIS 可以做到这一点吗?也许在数据流任务中,所有 XML 值都是从源中选择然后传递给某种解析器的?
I am looking for a way to pull XML from a SQL database and shred the XML via SSIS in bulk. I currently have a package that can pull XML from the database and pass the XML to a stored procedure, via variable, for shredding but this only works 1 record at a time. When processing 100,000 records, this can become quite time consuming.
I would like to shred multiple XML values at once using SSIS. Is this possible with SSIS? Perhaps something in a Data Flow Task where all the XML values are selected from a source then passed to a parser of some sort?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,经过大量搜索和思考问题后,我重新设计了执行粉碎的存储过程。我没有分解传递到存储过程中的变量,而是直接分解 XML 列本身。这使我能够一次分解许多 XML 值,而不是一次循环将它们传递给一个存储过程。这给了我想要的性能提升。所以不是这样的......
我现在这样做......
So after a lot of searching and thinking about the problem, I redesigned the stored procedures that did the shredding. Instead of shredding a variable being passed into the stored procedure, I just shredded from the XML column itself. This allowed me to shred many XML values at once instead of looping and passing them to a stored procedure one at a time. This gave me the performance boost I was looking for. So instead of something like this...
I now do this...