question

SachinGupta-8175 avatar image
0 Votes"
SachinGupta-8175 asked SachinGupta-8175 commented

Processing childItems from GetMetadata activity in ADF

I am using GetMetadata Activity in my pipeline to retrieve all the files which is present in Azure Blob storage. I am using the field = Child Items. Based on the file names I am getting in Child Items, I want to check in If condition activity whether that file is of a particular name, if yes, then do the copy activity, if not don't do any thing. How can I do that?

Below is the output from GetMetadata activity

{
"exists": true,
"childItems": [
{
"name": "User.csv",
"type": "File"
},
{
"name": "first.csv",
"type": "File"
},
{
"name": "healthcare-copyAct.csv",
"type": "File"
},
{
"name": "healthcare-dataset-stroke-data.csv",
"type": "File"
},
{
"name": "second.csv",
"type": "File"
}
]

azure-data-factory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NandanHegde-7720 avatar image
0 Votes"
NandanHegde-7720 answered SachinGupta-8175 commented

Hey,
Since the child items can be an array,
You would need to use a for each loop with the input as the childitem list to iterate over each file name.
Within for each, have an if condition and then copy activity based on the scenario.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@NandanHegde-7720 ... Thanks. I was able to resolve the problem, though I have another problem which I am trying to resolve

0 Votes 0 ·