0
votes

I am trying to use a wild card folder path that is being supplied by getmetadata and foreach. The actual file name within these folders ends with _Problem_1.csv however i get the following error. can anyone advise me on where i am going wrong?

{ "errorCode": "2200", "message": "ErrorCode=UserErrorSourceBlobNotExist,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The required Blob is missing. Folder path: client-uploads/[{\"name\":\"A001\",\"type\":\"Folder\"},{\"name\":\"A002\",\"type\":\"Folder\"},{\"name\":\"A004\",\"type\":\"Folder\"},{\"name\":\"A006\",\"type\":\"Folder\"},{\"name\":\"A623\",\"type\":\"Folder\"}]/.,Source=Microsoft.DataTransfer.ClientLibrary,'", "failureType": "UserError", "target": "Copy data1", "details": [] }

fa

1

1 Answers

1
votes

You can try having your Copy activity inside the forEach activity and having for each items dynamic expression as below, which will get the list of all Folder names (This will also include file names if any exists in the folder you are pointing in getmetadata activity).

ForEach Activity Dynamic expression: Items : @activity('getFolderNames').output.childItems

enter image description here

Here are child Items from getMetaData:

{
"childItems": [
    {
        "name": "A001",
        "type": "Folder"
    },
    {
        "name": "A002",
        "type": "Folder"
    }
],
"effectiveIntegrationRuntime": "DefaultIntegrationRuntime (West US)",
"executionDuration": 0,
"durationInQueue": {
    "integrationRuntimeQueue": 0
},
"billingReference": {
    "activityType": "PipelineActivity",
    "billableDuration": {
        "Managed": 0.016666666666666666
    }
}

Than you have to use the "item().name" in the wild card file path expression field of copy activity, to get the name of folder per iteration of forEach activity.

In my sample, I have tried below concat expression to point to the correct folder path name for each iteration.

Wildcard Folder path: @{Concat('input/MultipleFolders/', item().name)}

This will return:

For Iteration 1: input/MultipleFolders/A001

For Iteration 2: input/MultipleFolders/A002

enter image description here

Hope this helps..