Search code examples
sql-serverssisetlforeach-loop-container

what are the items in a collection that referred in foreach item type enumerator within foreach loop container


When I recently went through Microsoft documentation about SSIS -- Foreach Item Enumerator, the following points took my attention:

Foreach Item enumerator to enumerate items that are collections. For example, you can enumerate the names of executables and working directories that an Execute Process task uses.

You use the Foreach Item enumerator to enumerate items in a collection.

From the above two highlighted statements, what are such items that are considered to be collections? Is there any documented source to understand the concept of 'collection' and 'its items'?

would anyone help me understand the scenario? Thank you for giving your valuable time. This is the link from the above-highlighted lines of text is taken


Solution

  • The collection is a predefined table (columns and rows) in the ForEach loop container editor. For example, you need to enumerate files within three directories, you can add a ForEach loop container with an item enumerator to loop over the directory names and use another ForEach loop container to enumerate the files of each directory.

    You can read more details in the following article: