Chapter 48. Exploring different types of enumerators in the SSIS Foreach Loop container

 

Abolfazl Radgoudarzi and Shahriar Nikkhah

There are two types of loop structures in SQL Server Integration Services (SSIS): the For Loop container and the Foreach Loop container. The Foreach Loop container will loop through items in the specified collection, where the collection is divided into seven different enumerators. You may need to loop through files, items in a directory, records in a data table, nodes in XML data, and SMO objects.

Make it dynamic

Expressions provide a dynamic way of working in SSIS, particularly when combined with a Foreach loop. For example, you can change data sources in data flow tasks at runtime or change the path of an FTP address without changing the package and recompiling it. There are times when you encounter situations that require the processing of several similarly structured .csv files in one table. This is achieved with a single dataflow task inside a Foreach Loop enumerator. This ability to use combinations of expressions and the Foreach loop is illustrated in some of the examples of this chapter to familiarize you with dynamic SSIS development.

Foreach Loop enumerators

The following sections offer brief descriptions with examples for all seven enumerators in the Foreach Loop container.

File Enumerator

Summary

 
 

About the authors

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest