• Koen Verbeeck (3/7/2014)


    It is possible:

    * store the current file name in a variable (you can configure this in the for each loop)

    * inspect the file name with a script task. According to the value found, set another variable (for example: if _Product_ was found, store Product in @typeFile variable)

    * connect the script task to 12 data flow tasks (assuming each file has a different layout). In the precedence constraint, use an expression. For example: @typeFile == "Product"

    The downside is that you are processing file per file.

    While 12 for each loops may seem ugly, it will probably be much faster.

    I agree. Even though it's bit tedious, 12 FE loops would be much faster as they can start in parallel.

    You can just design one FE loop and copy and paste it 11 times and modify each one accordingly.

    --

    SQLBuddy