Wednesday, March 28, 2012

Precedence puzzle

Hello folks,

I have probably a dumb newbie question but I can't find the answer anywhere.

On my Control Flow design pane I have two objects: a SQL task object and a Data flow task object. The first 'points' to the second. From my digging I believed that by indicating with the arrow from 1 to 2 that 1 would execute to finish before 2 was started.

My SQL taks is to truncate a table to receive the new data coming from the data flow task object. Instead 2 executes first and then 1. You can imagine producing an empty table was not my goal for this package.

Can anybody give me a clue?

Thanks....

Jim

That's very strange. If there is a precedence constraint pointing FROM the Exec SQL Task TO the Data-flow Task then the Exec SQL Task should execute first.

Are you sure that is how it is setup?

-Jamie

|||

Yes, that's the setup. Do you have to do anything other than drag the arrow from the Execute SQL Task to the Data Flow Task in order for precedence to be followed?

Jim

|||Are you sure they are executed in this order? How do you determine this?

I would try setting pre-execute breakpoint in designer (select the task, click F9, repeat for second task) and see what is the execution order, what happens to the tables after each step, etc.|||

Two clues tell me the steps are running out of order. First watching the process pane as it executes always shows the SQL task executing second and the end result of the package run is an empty data set.

I will try the break point to see what happens. Thanks for the tip.

|||Unfortunately, progress pane can be confusing. It groups the events from tasks under one node, and the order is determined by the order of the first events from the task. So if data flow task is validated first, it will appear above the SQL task (the validation order is not affected by precedence constraints).|||Just curious. Does your source table have any data?
Make sure its not empty.|||

That sounds like what I was seeing and just got paranoid. I set break pionts as suggested in an earlier post and confirmed the order of execution.

Thanks to all for your help!

No comments:

Post a Comment