经过几年的不使用,我刚刚回到SSIS.这是我需要做的.
1) Read a value from a table and store into a variable
2) Create a data flow where I retrieve some number of rows
having a value greater than the value retrieved in #1.
3) Store the rows retrieved in #2 into another table
4) Determine the maximum value of a particular column from the rows
read in from step #2 and update the table referenced in #1.
Run Code Online (Sandbox Code Playgroud)
前三个步骤简单,直接且有效.但是,我不确定完成#4的最佳方法.
Best可以始终是主观的,但最直接的机制是在目的地之前添加多播组件.
多播将允许流经管道的所有数据显示在多个流中.这一切都是通过指向实际数据缓冲区来完成的,并不会导致所散布数据的物理副本.
从Multicast中,将其连接到Aggregate组件,并对您正在使用的任何列执行MAX操作.
您知道您将只有一行来自此聚合,因此我将使用OLE DB命令组件来更新您的表#1.就像是
UPDATE ETLStatus
SET MaxValue = ?
WHERE PackageName = ?;
Run Code Online (Sandbox Code Playgroud)
然后你将列名映射为like
MaxValue => Parameter_0
PackageName => Parameter_1
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2190 次 |
| 最近记录: |