ssis - Capturing the max value in a data flow -
i'm getting ssis after several years of not using it. here need do.
1) read value table , store variable 2) create data flow retrieve number of rows having value greater value retrieved in #1. 3) store rows retrieved in #2 table 4) determine maximum value of particular column rows read in step #2 , update table referenced in #1.
the first 3 steps easy, straightforward , working. however, i'm not best way accomplish #4.
best can subjective straight forward mechanism add multicast component prior destination.
the multicast allow data flowing through pipeline show in more 1 stream. done through pointers actual data buffers , doesn't result in physical copies of data being strewn about.
from multicast, connect aggregate component , perform max operation on whatever column you're using.
you know have 1 row coming aggregate i'd use ole db command component update table #1. like
update etlstatus set maxvalue = ? packagename = ?;
and you'd map column names in like
maxvalue => parameter_0 packagename => parameter_1
Comments
Post a Comment