SSIS Foreach Loop with Conditional Data Flows/Flat File Connections?

Robert Ong 1 Reputation point
2020-08-27T14:46:12.453+00:00

I'm setting up a process to bulk insert daily flat files into a staging warehouse. The flat files are not very clean. The files for the first 40 days contains 20 column and the days after contain 22 columns.

How can I set up my foreach loop to switch between different data flows depending on what version of these files it's on?

So Ideally I'd like to set it up so that the loop will run flow A until it hits a certain date where it will switch over to use flow B.

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,508 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Stratos Matzouranis 36 Reputation points
    2020-08-27T15:16:11.707+00:00

    If you use T-SQL statement task with the use of ROW_NUMBER ?


  2. Monalv-MSFT 5,896 Reputation points
    2020-08-28T03:24:47.317+00:00

    Hi Robert Ong,

    May I know if you have anything update by using Precedence Constraints?

    Hope the following links will be helpful to you:

    Using Precedence Constraints In SSIS

    Overview of SSIS Precedence Constraints

    Best Regards,
    Mona

    ----------

    If the response is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments