简体   繁体   English

Azure 数据工厂 - 如何禁用管道?

[英]Azure Data Factory - How to disable a pipeline?

I have a data factory that I would like to publish, however I want to delay one of the pipelines from running as it uses a shared resource that isn't quite ready.我有一个我想发布的数据工厂,但是我想延迟其中一个管道的运行,因为它使用尚未完全准备好的共享资源。

If possible I would like to allow the previous pipelines to run and then enable the downstream pipeline when the resource is ready for it.如果可能,我希望允许之前的管道运行,然后在资源准备好时启用下游管道。

How can I disable a pipeline so that I can re-enable it at a later time?如何禁用管道以便我可以在以后重新启用它?

Edit your trigger and make sure Activated is checked NO.编辑您的触发器并确保已选中“否”。 And of course don't forget to publish your changes!当然不要忘记发布您的更改!

在此处输入图片说明

Its not really possible in ADF directly.直接在 ADF 中是不可能的。 However, I think you have a couple of options to dealing with this.但是,我认为您有几种选择来处理这个问题。

Option 1.选项1。

Chain the datasets in the activities to enforce a fake dependency making the second activity wait.将活动中的数据集链接起来以强制执行假依赖,从而使第二个活动等待。 This is a bit clunky and requires the provisioning of fake datasets.这有点笨拙,需要提供假数据集。 But could work.但可以工作。

Option 2.选项 2。

Manage it at a higher level with something like PowerShell.使用 PowerShell 之类的工具在更高级别对其进行管理。

For example:例如:

Use the following cmdlet to check the status of the first activity and wait maybe in some sort of looping process.使用以下 cmdlet 检查第一个活动的状态,并在某种循环过程中等待。

Get-​Azure​Rm​Data​Factory​Activity​Window

Next, use the following cmdlet to pause/unpause the downstream pipeline as required.接下来,根据需要使用以下 cmdlet 暂停/取消暂停下游管道。

Suspend-​Azure​Rm​Data​Factory​Pipeline

Hope this helps.希望这可以帮助。

  1. You mentioned publishing, so if you are publishing trough Visual Studio, it is possible to disable a pipeline by setting its property "isPaused" to true in .json pipeline configuration file.您提到了发布,因此如果您通过 Visual Studio 发布,则可以通过在 .json 管道配置文件中将其属性“isPaused”设置为 true 来禁用管道。

Property for making pipeline paused使管道暂停的属性

  1. You can disable pipeline by clicking Monitor & Manage in Data Factory you are using.您可以通过单击正在使用的数据工厂中的监控和管理来禁用管道。 Then click on the pipeline and in the upper left corner you have two options:然后单击管道,在左上角您有两个选项:
    • Pause: Will not terminate current running job, but will not start next暂停:不会终止当前正在运行的作业,但不会开始下一个
    • Terminate: Terminates all job instances (as well as not starting future ones)终止:终止所有作业实例(以及不启动未来的)

GUI disabling pipeline GUI禁用管道

(TIP: Paused and Terminated pipeline have orange color, resumed have green color) (提示:暂停和终止的管道为橙色,恢复为绿色)

  1. Use the powershell cmdlet to check the status of the activity使用 powershell cmdlet 检查活动的状态

    Get-​Azure​Rm​Data​Factory​Activity​Window Get- Azure Rm Data Factory Activity Window

Use the powershell cmdlet to pause/unpause a pipeline as required.根据需要使用 powershell cmdlet 暂停/取消暂停管道。

Suspend-​Azure​Rm​Data​Factory​Pipeline

右键单击“监视和管理”应用程序中的管道,然后选择“暂停管道”。

In case you're using ADF V2 and your pipeline is scheduled to run using a trigger, check which trigger your pipeline uses.如果您使用 ADF V2 并且您的管道计划使用触发器运行,请检查您的管道使用哪个触发器。 Then go to the Manage tab and click on Author->Triggers.然后转到“管理”选项卡并单击“作者”->“触发器”。 There you will get an option to stop the trigger.在那里,您将获得停止触发器的选项。 Publish the changes once you've stopped the trigger.停止触发器后发布更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM