枚举Azure Data Factory v2中的Blob名称 [英] Enumerate blob names in Azure Data Factory v2

查看:53
本文介绍了枚举Azure Data Factory v2中的Blob名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要枚举Azure Blobs容器中的所有Blob名称,并将列表转储到另一个Blob存储中的文件中.

I need to enumerate all the blob names that sit in an Azure Blobs container and dump the list to a file in another blob storage.

我无法掌握的部分是枚举. 谢谢.

The part that I cannot master is the enumeration. Thanks.

推荐答案

获取元数据活动是您想要的. https://docs.microsoft. com/en-us/azure/data-factory/control-flow-get-metadata-activity

Get metadata activity is what you want. https://docs.microsoft.com/en-us/azure/data-factory/control-flow-get-metadata-activity

  1. 请使用childItems获取所有文件.然后使用foreach迭代childItems

  1. Please use childItems to get all the files. And then use a foreach to iterate the childItems

在每个活动的内,您可能要检查每个项目是否是一个文件.您可以使用if活动和以下表达式.

Inside the for each activity, you may want to check if each item is a file. You could use if activity and the following expression.

然后在如果为true"活动中,假设您要复制数据,则可以使用@item().name来获取每个文件名.

Then in the "If true" activity, assume you want to copy data, you could use @item().name to get each of your file name.

您可以通过 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆