You have probably already seen this scenario. You want to load data, do transformations over it and then enumerate the result data flow in a standard for each loop container. The recommended Microsoft solution is to direct your data flow to in-memory ADO recordset destination component and then setup the for each loop container to iterate the result ADO recordset. As you probably understand this solution has one major shortcoming. It is extremely memory intensive and has unpredictable performance. Wouldn’t be great if somehow the data being processed in a data flow can be send directly for processing in foreach loop enumeration, without intermediate steps requiring additional memory consumption?
Well, thanks to the enhancements our SSIS+ 1.3 library brings, it is now possible to do it. We have created an SSIS script task, which creates wrapper object over standard DataReader Destination component. The object is then stored in package variable and can be used in your enumeration container control flows. The script is available for download here. Enjoy.
Tip: Each iteration item is of type IDataRecord.