Debugging SSIS package - why both parts are executed

Naomi 7,366 Reputation points
2022-09-12T21:09:50.603+00:00

Hi everybody,

I am debugging an SSIS package and I don't understand why am I seeing this in debugger

240236-image.png

I have expression constrains. One task - create header text is supposed to execute when User variable > 0, the other is executed when User Variable == 0. I press F5 and I know that my variable > 0. Why do I see both tasks executed when I debug the package?

Thanks in advance.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,642 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,560 questions
{count} votes

Accepted answer
  1. Yitzhak Khabinsky 25,846 Reputation points
    2022-09-12T21:26:17.703+00:00

    Hi @Naomi ,

    You need to check your SSIS Precedence Constraint expressions coming out of the 'Get Expected Row Count' Task. Both of them. Unfortunately, the question doesn't show the SSIS Precedence Constraints.

    You should try Evaluation operation: Expression and Constraint

    First Precedence Constraint (Audit - nothing to extract):
    (1) Value: Success
    (2) Expression: @[User::RowCount] == 0

    Second Precedence Constraint (Create Header Text):
    (1) Value: Success
    (2) Expression: @[User::RowCount] > 0

    UPDATE
    Please make sure that you are using the correct variable(s).
    Your screen shots show that there are two different valuables are in use:

    • User::varRowCount
    • User::varHeaderRowCount
    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Naomi 7,366 Reputation points
    2022-09-12T22:07:07.377+00:00

    Hi Yitzhak,

    No matter how I modify the constraint I still get all tasks executed (e.g. the first picture doesn't change). I tried all possible combinations for the precedence constraint. Is it what I'm seeing wrong? I would expect only main flow to execute, not both of them.

    240274-image.png

    240149-image.png

    For the second constraint I tried all available combinations, but I always get both flows evaluated and executed.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.