个数据流任务链接到一个执行

个数据流任务链接到一个执行

本文介绍了2 个数据流任务链接到一个执行 SQL 任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个数据流任务,其中只有 2 个任务会执行 1 个.在其中任何一个执行之后,我想要一个执行 SQL 任务来执行.当每个数据流任务都有一个绿色进入执行 sql 任务时,执行 sql 任务不会被执行.数据流任务成功完成,但从未执行到执行 SQL 任务.你能只有一个绿色箭头(成功)进入一项任务吗?谢谢

I have two Data Flow tasks where only 1 of the 2 will execute. After either of these execute I want an Execute SQL Task to execute. When I have a green from each data flow task going into the execute sql task, the execute sql task does not get executed. The data flow task completes successfully but execution never makes it to the Execute SQL Task. Can you only have one green arrow (success) going into a task?Thanks

推荐答案

默认情况下,两个任务受成功约束.也就是说,第一件事必须产生一个成功值,然后第二件事才会得到开始的信号.

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.

您有一组二进制数据流任务,它们馈送到单个执行 SQL 任务中.执行 SQL 任务正在等待两者完成.这不会发生,因此您必须更改约束.

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.

执行此操作的简单方法是双击将数据流连接到执行 SQL 的行,无论哪个都无关紧要,并将优先约束从逻辑与"更改为逻辑或".这允许执行 SQL 任务在任一数据流生成成功时运行.

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.

用于创建 Or 约束的 Biml 构造如下所示.我在 PrecedentConstraint 中指定 Or

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>

这篇关于2 个数据流任务链接到一个执行 SQL 任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 00:44