none
Three Dynamic Flat File Sources for different SSIS packages

    Question

  • We have one source folder and three different file formats, all of .txt type.  We might have a 2 of the same file format with different timestamps...

    FILE1 - TIMESTAMP1.txt
    FILE2 - TIMESTAMP1.txt
    FILE3 - TIMESTAMP1.txt
    FILE1 - TIMESTAMP2.txt

    Then we have 3 SSIS packages.  SSIS1 would run against FILE1, SSIS2 against FILE2, etc.

    How do I tell SSIS1 to only pick up and work with FILE1 files, SSIS2 to pick up FILE2 files, etc?  Or, is this even possible?

     

    Thank you!

    Wednesday, March 24, 2010 8:43 PM

Answers

  • In the master package use a foreach loop task to loop through the file.

    Save the file Name to a variable FileName

    In the loop put a dummy Script task and connect 3 Execute Package Task(one for each child Package)

    In the precedence constraint set the expression to read the file name and decide something like:

    FINDSTRING(@[User::FileName],"File1",1)>0

    FINDSTRING(@[User::FileName]e,"File2",1)>0

    FINDSTRING(@[User::FileName],"File3",1)>0


    Sudeep's Blog
    • Marked as answer by Zongqing Li Wednesday, March 31, 2010 7:58 AM
    Wednesday, March 24, 2010 8:47 PM