Reputation: 85
There is a blob storage account, the name of the blob storage account is azureblob11
it has a container with the name source
.
The container source
contains 2 level subfolders.
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.
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.
Upvotes: 0
Views: 1821
Reputation: 4602
Here is my list of Subfolder I.e., Output of Get Metadata:
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.
Step 1 > On a pipeline Create a Variable FolderCount of String type.
Step 2 > Select the Set Variable Activity on GetMetaData DataSet.
Step 3 > Inside SetVariable Activity navigate to Variable and add dynamic content.
Step 5 : Now final debug.
Upvotes: 1