SSIS-插入新行,更新行 [英] SSIS - Insert new rows, update rows

查看:174
本文介绍了SSIS-插入新行,更新行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

检查哪一行已更改以及哪些行已存在的最佳"或推荐方法是什么? 我发现的文章很少,但是我不确定这些方法是否最好:

What is the "best" or recommended method to check which row has changed and which rows already exist? I found few articles but I am not sure if these methods are the best:

http://www.ssistalk.com/2007/03/09/ssis-using-a-checksum-to-determine-if-a-row-has-changed/
http://itssmee.wordpress.com/2010/10/03/ssis-insert-and-update-rows-in-a-table-based-on-the-contents-of-a-excel-file/
http://consultingblogs.emc.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx

对于来自25个数据库的大量数据,我需要使用它

I need this for really large amounts of data from 25 databases

在本文中...

In this article... http://consultingblogs.emc.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx ... how do I add part for updating records? Do I use OLE DB Command or there's something else in this article I don't see?

推荐答案

那些链接是那里最好的.菲尔(Phil)和杰米(Jamie)在这个问题上知识渊博.您唯一真正可行的选择是加载整个表并使用T-SQL的MERGE命令找出差异.

Those links are the best out there. Phil and Jamie are very knowledgeable on the subject. Your only other real alternative is to load the whole table and use T-SQL's MERGE command to figure out differences.

Jamie Thomson的帖子具有三个输出,这些输出以Union Alls结尾,在您的最终数据库上并没有真正起作用".明确地说,您可以舍弃这些输出之一-因为它是无变化"输出(标记为年龄保持不变"的输出).标记为新客户"的一个可能会路由到OLE DB目标中.标记为年龄已更改"的一个是您要路由到OLE DB命令转换的那个.

Jamie Thomson's post has three outputs that end in Union Alls that don't really "do work" on your end database. To be clear, one of those outputs you can discard - because it's the "no change" output (the one that's labeled "Age has stayed the same"). The one labeled "New Customers" is one you would probably route into an OLE DB Destination. The one labeled "Age has changed" is the one you'd route into an OLE DB Command transform.

现在,OLE DB Command转换不能这么快地工作.有很多方法可以解决这种问题,但是快速搜索应该可以为您解决该问题.

Now, the OLE DB Command transform doesn't work that fast. There are ways around that slowness, but a quick search should fix that problem for you.

这篇关于SSIS-插入新行,更新行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆