2 Data Flow Tasks Linking to one Execute SQL Task

By default, two tasks are constrained by the Constraint of Success. That is, the first thing must generate a success value before the second thing will get the signal to start.

You have a binary set of Data Flow Tasks feeding into a single Execute SQL Task. The Execute SQL Task is waiting for both to finish. That’s not going to happen so you must change the constraint.

The simple way to do this is to double click on the line connecting the Data Flow to the Execute SQL, doesn’t matter which, and change the Precedence Constraint from a “Logical AND” to a “Logical OR”. This allows the Execute SQL Task to run if either Data Flow generates a Success.

enter image description here

The Biml construct for creating the Or constraint appears as follows. I specify in the PrecedentConstraint a LogicalType of Or

<Biml xmlns="http://schemas.varigence.com/biml.xsd">
    <Packages>
        <Package Name="so_28463621">
            <Tasks>
                <Dataflow Name="DFT 1"></Dataflow>
                <Dataflow Name="DFT 2"></Dataflow>
                <Container Name="OneOrTwo">
                    <PrecedenceConstraints LogicalType="Or">
                        <Inputs>
                            <Input OutputPathName="DFT 1.Output"></Input>
                            <Input OutputPathName="DFT 2.Output"></Input>
                        </Inputs>
                    </PrecedenceConstraints>
                </Container>
            </Tasks>
        </Package>
    </Packages>
</Biml>

Leave a Comment