本文介绍了删除文件ADL或Azure存储&更优雅的发送失败通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个2部分问题:
$


1.处理后如何移动/删除文件。 目前我们只能复制,但原始文件仍保留在源代码中。 理想情况下,我们不希望添加单独的流程来获取元数据并进行比较是否已处理。 我一直关注
一个博客,要求使用WEB活动和Delete Rest API。 我已经达到了这一点,但我无法理解/遵循获取ACCESS TOKEN的说明。   它显示了Curl步骤,如果有人可以提供帮助就很棒。 

2.我创建了一个有4个主要活动的管道。 作为此管道的一部分,我希望能够发送成功和失败的电子邮件通知。



活动的每次成功都会转移到下一个活动,但是如果有任何活动失败它会发送电子邮件。 我希望能够拥有一个SUCCESS或FAILURE通知,并动态地将内容添加到电子邮件中,而不是在以前的活动中发送电子邮件。 
 对于Failur,似乎我必须为每个活动创建一个单独的Web活动以对齐失败,这不是优雅的。 



根据WEB活动如何设置为使用电子邮件的逻辑应用程序,我们必须定义与电子邮件关联的活动名称(至少基于我的理解)。所以我为每个失败的电子邮件创建了一个单独的WEB活动,不是很优雅。



有没有人有更好的处理方式。



![image](https://user-images.githubusercontent.com/10181016/52460943-cc779f80-2b3a-11e9-8b1d-2c17aad21d64.png)

This is a 2 part issue:

1. How to move/delete a file after processing.  Currently we can only copy, but the original file remains in the source.  Ideally we don't want to add a separate process to get metadata and compare if processed or not.  I have been following one blog that asks to use a WEB activity and the Delete Rest API.  I have gotten to that point, but I am not able to understand/follow instructions on to obtain the ACCESS TOKEN.   It shows Curl steps, if someone can help on this would be great. 
2. I have created a pipeline, that has 4 Main activities.  As part of this pipeline I want to be able to send email notifications for Success and failure.

Each success of an activity moves to the next activity, but if any activity fails it will send email.  I Want to be able to have one SUCCESS or FAILURE Notification and dynamically add content to email instead of sending email on previous activity.   For Failur it seems like I have to create a separate web activity for each activity to align a Failure, which is not elegant. 

Based on how the WEB activity is set to use the logical apps for email, we have to define the activity name that the email is associated with (at least based on my understanding). So i created a separate WEB activity for each failure email, not very elegant.

Does anyone have a better way to handle.

![image](https://user-images.githubusercontent.com/10181016/52460943-cc779f80-2b3a-11e9-8b1d-2c17aad21d64.png)

推荐答案

对于延迟回复感到抱歉。让我们逐步解决您的问题:

Sorry for the delayed response. Let's go 1 by 1 on your issues :

1。我们过去曾多次收到此问题,并正在开展复制或移动活动后删除文件的活动。现在,您可以通过使用自定义活动或网络活动来复制
后删除文件( ADLS

Blob存储
) 。

1. We have received this issue a couple of times in the past and are working on having an activity to delete files after copying or a move activity. For now, you can do so by Using a custom activity or a web Activity to delete the files after copying (ADLSand Blob Storage).

2。我可以想到一种优雅的方式 - 您可以在复制活动后链接一个Web活动并使用表达式获取状态 -   活动('ArchiveFiles')。output.executionDetails [0] .status。 

2. I can think of one elegant way of doing it - you can chain a web activity after your Copy Activity and use an expression to get the status - activity('ArchiveFiles').output.executionDetails[0].status. 

如果有帮助,请告诉我们。另外,我们很乐意继续进一步探讨。

Let us know if this helps. Else we can gladly continue to probe in further.





这篇关于删除文件ADL或Azure存储&更优雅的发送失败通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 11:08