How can I copy files from an input container to an output container in Azure blob storage, and sort them into three different folders based on their file size, with files less than 1KB going to the 1KB folder, files between 1KB to 2KB going to the 2KB folder, and files larger than 2KB going to the more than 2KB_More folder?
Any one can help on this
2
Answers
Please use the below logical flow :
sample for dynamic : Azure Data Factory Dynamic Content Filename Syntax
Adding to @Nandan‘s answer, The 4th step in the above process can be done like below.
After getting file size from second Get meta data activity, first convert the bytes to KB with the below expression.
Then use if expression in another variable set the folder names like below.
Use this name in the sink dataset foldername.
My Result:
NOTE: If you are copying different types of files, it’s better to use a binary datasets for this.