且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

基于临时数据删除/插入/更新的SSIS包

更新时间:2023-12-04 17:58:58

嗨  neophytenik,

不幸的是,SSIS没有UPSERT目的地已经开箱即用。

Unfortunately, SSIS doesn't have UPSERT Destination out-of-the-box.

很久以前,一位微软实习生在SSIS开发。团队将其实施为  概念验证(POC),但它从未将其纳入实际产品。

Long time ago one Microsoft intern on the SSIS dev. team implemented it as a Proof of Concept (POC), but it never made it into the actual product.

这就是为什么***选择分为两步:

That's why the best option is a 2 step process:


  1. 通过SSIS 数据流任务将增量数据插入临时表。
  2. 使用SSIS 执行SQL 任务通过
    T-SQL MERGE 语句一次性插入和更新目标表。

  1. Insert incremental data into a staging table via SSIS Data Flow Task.
  2. Use SSIS Execute SQL Task to INSERT and UPDATE target table in one shot via T-SQL MERGE statement.