Foreach Loop Container: looping through data table
One of the enumerators in Foreach Loop is the Item Enumerator. This enumerator has the ability to create a temporary table in the SSIS Foreach Loop Container itself to use as the iteration list. This option will remove the need for an external temporary storage as we saw in the Foreach Loop Container: looping through result set of a database query recipe of this chapter.
In this recipe, we will reveal another real world sample with Item Enumerator. We will loop through the list of servers with different database names, and load the same data structure from the same table but onto different servers into different excel files which will be named based on the data sources.
Getting ready
For this recipe we need to have both
AdventureWorks2012
andAdventureWorksLT2012
together.Create a
R05_Template.xlsx
file that only contains two column headers namely,SchemaName
andTableName
.
How to do it...
Create a SSIS project and name it
R05_Foreach Loop Container...