基于临时数据删除/插入/更新的SSIS包 [英] SSIS package to delete/insert/update based on Staging data

查看:84
本文介绍了基于临时数据删除/插入/更新的SSIS包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我每天都会将增量数据加载到Staging表中。

I have incremental data loaded into the Staging table on a daily basis.

目前,我使用登台数据使用SQL(执行SQL任务和数据流)在目标表上执行插入/更新/删除

Currently, i use the staging data to perform insert/update/delete on the destination table using SQL(Execute SQL task and data flow)

但是我想将进程移动到SSIS,以便能够根据登台数据插入/更新目标表,而不必使用eexcute sql任务插入/更新, 

but i want to move the process to SSIS, to be able to insert/update the destination table based on the staging data wihout having to use eexcute sql task for insert/update, 

请指导有助于实现结果的现有SSIS任务,非常感谢

Please guide on existing SSIS tasks that help to achieve the outcome, thanks very much

推荐答案

嗨  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.





这篇关于基于临时数据删除/插入/更新的SSIS包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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