Hi @abhilash yadav ,
Thank you for asking this question. In my opinion, the solution you want to achieve in the pipeline using CopyActivity would be too much expensive as too many Activities (i.e., CopyActivities and other Activities) will run just for a single pipeline run. You can achieve the same output in a way more simpler and cleaner way by using DataFlow.
The steps you have to do are:
- create a DataFlow. To make folder path dynamic, you can add a parameter folderPath
- add required sources (in the source activity, you can pull all data from SQL table or you can use Query, it's up to you)
- do data manipulations (you can do a lot of things e.g., filter, aggregate, pivot, deriveColumns etc.)
- before Sink, derive column "filePath" e.g., out/Birds/birdtype1.parquet
- in the Sink --> Settings: select FilenameOption to "As data in column" and select column with filename to "filePath".
- in Sink-->Optimize: Use Current Partition
That's all. All the data with the same filePath, will be written in that specific file. You will get all the files in the folderPath you mentioned in the pipeline.
Please see screenshots attached and let me know if you have any questions. If the above response helped, please "accept as answer" and "up-vote" the same! Thanks!