简体   繁体   English

如何删除 azure 数据工厂管道中的文件夹?

[英]How to delete a folder in an azure data factory pipeline?

When running MapReduce jobs, the output folder should not exist otherwise the job fails.运行 MapReduce 作业时,输出文件夹不应存在,否则作业将失败。 So when defining an azure data factory how can I define an activity to delete yhe existing output folder?因此,在定义 azure 数据工厂时,如何定义活动以删除现有的输出文件夹? Oozie has a preprocessing activity that can be used to delete the a folder but I don't kbow how to do it in data factory? Oozie 有一个预处理活动,可用于删除文件夹,但我不知道如何在数据工厂中执行此操作?

You can add a custom activity prior to the MapReduce activity that will delete the folder using a programmatic approach by writing an executable and invoking it from the pipeline.您可以在 MapReduce 活动之前添加自定义活动,该活动将使用编程方法通过编写可执行文件并从管道调用它来删除文件夹。 Use this tutorial as reference and examples .使用本教程作为参考和示例。 Basically you will need to upload the executable to a blob storage and Data Factory will execute it.基本上,您需要将可执行文件上传到 blob 存储,然后数据工厂将执行它。

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

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