[英]How to get the count of containers in blob storage account using Azure Data Factory?
There is a blob storage account, the name of the blob storage account is azureblob11
it has a container with the name source
.有一个 blob 存储帐户,该 blob 存储帐户的名称是
azureblob11
它有一个名为source
的容器。
The container source
contains 2 level subfolders.容器
source
包含 2 级子文件夹。
The folder structure looks similar:文件夹结构类似:
source (container)
|--a (folder)
|--ana (sub-folder)
|--hem (sub-folder)
|--thg (sub-folder)
|--oud (sub-folder)
I have copied the sub-folders along with their data to the container level and created these 4 subfolders as new containers along with their data.我已将子文件夹及其数据复制到容器级别,并将这 4 个子文件夹及其数据创建为新容器。
The folder structure looks like this after copying the sub-folders to container level将子文件夹复制到容器级别后,文件夹结构如下所示
source (container)
|--a (folder)
|--ana (sub-folder)
|--hem (sub-folder)
|--thg (sub-folder)
|--oud (sub-folder)
ana (container)
hem (container)
thg (container)
oud (container)
The goal I am trying to achieve is to find the count of containers in the storage account that I have copied from sub-folder level to container level using Azure Data Factory.我试图实现的目标是使用 Azure 数据工厂找到我从子文件夹级别复制到容器级别的存储帐户中的容器计数。
Here is my list of Subfolder Ie, Output of Get Metadata:这是我的子文件夹列表,即获取元数据的 Output:
As a workaround we can count the subfolder instead of count container.As you are making containers from subfolder only.作为一种解决方法,我们可以计算子文件夹而不是计算容器。因为您只从子文件夹制作容器。
To get the count of subfolder you should use the length function.要获得子文件夹的数量,您应该使用长度function。
Step 1 > On a pipeline Create a Variable FolderCount of String type.步骤 1 > 在管道上创建 String 类型的变量 FolderCount。
Step 2 > Select the Set Variable Activity on GetMetaData DataSet.步骤 2 > Select GetMetaData 数据集上的设置变量活动。
Step 3 > Inside SetVariable Activity navigate to Variable and add dynamic content.第 3 步 > 在 SetVariable Activity 中导航到变量并添加动态内容。
Step 5: Now final debug.第 5 步:现在进行最终调试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.