SSIS 2012 - Dataflow startup in For Each Loop

  • Hi, I have a package which will call two dataflows in a for each loop. The first dataflow will build a stage table joining data from source. the second will process all rows in the stage table loaded in the first dataflow. The SQL in each is simple and fast to run. (EG: the second dataflow is simply select * from stage).

    On any given run the For Each Loop will loop 600- 800 times.

    The problem I am having is that each time either of the dataflows runs in the loop there seems to be a 4-6 second delay before it reads data. Even in the second one where it is simply a select *. Combined this adds to about 8 seconds of delay (Validation maybe?) per loop instance. Therefore, I get only 3-4 loop instances run per minute. So my job can take 3 hours to run.

    Is there any way I can eliminate this delay on reading in the Dataflows to cut my runtime to a fraction of what it is now?

    Thanks

  • What is the ForEachLoop configured for? For each file, for each ado..?

  • Hi Sam,

    the For Each Loop is configured for unique date in source. It will process records for each date starting from the earliest.

    On any given day I can see 300-1200 dates.

    For each date it will call the stage dataflow to assemble the data for that date. Then the Load data flow (using Stage) to check for possible changes to the target (type 2)

    All source and Destination transforms in the dataflows are OLEDB.

    The reason I am not doing one set based stage and load is that I need the updates from one date applied to the final target before processing the next date.

    This way I can identify if the record has changes before updating (type 2) as I go through each date.

  • I should add. I have SQL to select all the unique dates for the For Each Loop and they are stored in a System Object variable. the For Each Loop will process For Each Ado Enumerator

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply