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

编程入门 行业动态 更新时间:2024-10-26 16:31:05
本文介绍了基于临时数据删除/插入/更新的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 aProof of Concept (POC), but it never made it into the actual product.

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

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

  • 通过SSIS 数据流任务将增量数据插入临时表。
  • 使用SSIS 执行SQL 任务通过 T-SQL MERGE 语句一次性插入和更新目标表。
  • Insert incremental data into a staging table via SSIS Data Flow Task.
  • Use SSIS Execute SQL Task to INSERT and UPDATE target table in one shot via T-SQL MERGE statement.
  • 更多推荐

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

    本文发布于:2023-10-27 16:14:22,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1533891.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:数据   SSIS

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!