如何使用逻辑应用取消运行时间较长的ADF管道。

huangapple go评论60阅读模式
英文:

How to cancel long running ADF pipelines using the logic app

问题

我有一个逻辑应用查询,用于获取长时间运行的流水线的详细信息,并通过电子邮件发送流水线名称。现在我想取消那些长时间运行的流水线,我该如何在逻辑应用中实现?

英文:

I have a logic app query to get the details of long running pipelines and I sending the email with the pipeline names. Now I want to cancel those pipelines which are running for long time how Can I implement with Logic app ?

答案1

得分: 1

  • 在逻辑应用中,“Azure数据工厂”连接器中直接提供了一个操作。以下是一个示例,您可以取消流水线运行。

  • 我正在使用的逻辑应用的流程如下:

如何使用逻辑应用取消运行时间较长的ADF管道。

  • 如下图所示,取消了流水线运行:

如何使用逻辑应用取消运行时间较长的ADF管道。

  • 并且将触发一封邮件,如下图所示:

如何使用逻辑应用取消运行时间较长的ADF管道。

  • 如果要动态获取流水线运行,可以使用此Microsoft文档中指定的REST API。
  • 您可以遍历此列表,检查状态为“InProgress”的项,并获取当前运行时间以检查是否足够长以进行取消。
英文:
  • There is an action available directly in logic apps "Azure data factory" connector. The following is an example where you can cancel a pipeline run.

  • The following is the flow of the logic app that I am using:

如何使用逻辑应用取消运行时间较长的ADF管道。

  • The pipeline run is cancelled as shown in the below image:

如何使用逻辑应用取消运行时间较长的ADF管道。

  • And a mail will be triggered as shown in the below image:

如何使用逻辑应用取消运行时间较长的ADF管道。

  • If you want to get the pipeline runs dynamically, you can use the rest API specified in this Microsoft documentation.
  • You can loop through this list and check for whose status is "InProgress" and get the current running time to check if its long enough to cancel.

答案2

得分: 1

If the intend is to cancel a long running ADF pipeline, you can do that from ADF only (using a different pipeline) - using web activity. 获取正在运行的管道(Saideep 在他的回应中提到了这一点)

  • 使用 durationInMs 属性来获取“运行时间多长”

  • 使用 runid 来取消运行:https://learn.microsoft.com/en-us/rest/api/datafactory/pipeline-runs/cancel?tabs=HTTP

英文:

If the intend is to cancel a long running ADF pipeline , you can do that from ADF only ( using a different pipeline)

huangapple
  • 本文由 发表于 2023年5月17日 20:20:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/76272045.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定