An Azure service for ingesting, preparing, and transforming data at scale.
To address the issue of selecting only files and excluding folders while using the "Get Metadata" activity in Azure Data Factory, you can use the following approach:
Use the Get Metadata Activity - Get Metadata Activity, this activity can be used to retrieve the properties of the files in your folder. Field List, in the Get Metadata activity, specify the field list to include childItems. This will return a list of items in the specified folder.
Filter the Results - Filter Activity, after retrieving the metadata, use a Filter activity to filter out only the items of type 'file'. Expression, you can use an expression like the following to filter the results - @equals(item().type, 'file')
Use the Filtered Output in Your Copy Activity - Copy Activity, connect the output of the Filter activity to your Copy activity. Dynamic Content, in the source settings of the Copy activity, use the filtered list of files to dynamically select the files you want to copy.
Important Considerations:
Performance - Ensure that your folder does not contain an excessive number of files, as this could impact performance.
Testing - Test the pipeline with a smaller dataset to ensure that the filtering works as expected before scaling up.
I hope this information helps.
Thank you.