Search code examples
sql-serverssisssis-2012

SSIS: Start data load package for final table


I have a daily 5 txt file in a Arrived folder, I'd like to design a SSIS package: each the txt file data load to stage then file goes to archive folder, if file not processing and load to stage then it will not goes archive, if all files load or not in stage this package job done. I have other package for stage to final table load but I want to make sure all files are load in stage then only this package run otherwise not run. how I will design SSIS package?

Can somebody help me?


Solution

  • As there is dependency on package:files loading to Staging to package:staging to final table, it is better to make them as single SSIS package.

    1. Define a Foreach Sequence Container, which processes the files.
    2. On successful completion of the Foreach Sequence Container, you can have task for data load to destination.

    Note: I have made the control flow simple. You need to have appropriate error logging to see the failed files and move them accordingly and successful files and move them accordingly.

    Sample Reference code is given below:

    enter image description here