Search code examples
sql-serverssisetlssis-2012foreach-loop-container

What is the `name` property in the ForEach loop's ForEach File enumerator expressions?


I have a Foreach loop container - ForEach File enumerator. What is the name property?

enter image description here


Solution

  • In SSIS, the Name and Description properties are common for all SSIS tasks, components, containers, objects. Those properties are used as metadata for each SSIS object.

    Regarding the ForEach Enumerator, it is an SSIS object that is embedded within the ForEach Loop Container. You can see this from the ForEach Loop Container property tab.

    enter image description here

    This means that the ForEach Enumerator object also has the Name and Description properties like any other SSIS object.

    Test

    I created a package, added a ForEach Loop Container. And change the enumerator type to ForEach File Enumerator. Then I assigned the following expression to the Name property: "aaa".

    enter image description here

    Now, in the Solution Explorer window, right click on the created package and click on View as Code.

    enter image description here

    We can check that the ForEach Enumerator object name is set to aaa.

    enter image description here