@Nick Wong Thanks for using MS Q&A platform and posting your query.
it looks like you're using Azure Data Factory (ADF) to copy files from subfolders within a root folder to another location in Azure Data Lake Storage (ADLS). However, the "Get Metadata" activity is only fetching files from the circled folder, "01 Binary".
There are two possible reasons for this:
- Incorrect Child Items Path: The Child Items path property in the Get Metadata activity might be set to the specific path of the circled folder instead of the root folder. To fix this, you'd need to use a wildcard character to capture all subfolders within the root directory. For example, instead of
adl://yourdatalakestorage.account.name/folder/01 Binary
, useadl://yourdatalakestorage.account.name/folder/*
.
Recursive Option Not Selected: The Get Metadata activity might not have the recursive option enabled. By default, Get Metadata only retrieves files from the specified folder, not subfolders. To capture files from all subfolders, enable the recursive option in the activity settings.
Here's a walkthrough on how to configure the Get Metadata activity to fetch files recursively from all subfolders within the root folder:
- In your ADF pipeline, navigate to the Get Metadata activity.
- In the activity properties, locate the Folder Path property.
- Set the Folder Path to the path of your root folder, including a wildcard character to denote subfolders. For instance,
adl://yourdatalakestorage.account.name/folder/*
- Go to the Settings tab of the activity.
- Under General settings, find the Recursive property.
- Set the Recursive property to True.
By following these steps, the Get Metadata activity should now retrieve all files from all subfolders within the specified root folder. You can then use the output of this activity in a subsequent Copy Data activity to transfer the files to your destination folder in ADLS.
Hope this helps. Do let us know if you any further queries.