I'm using copy activity to send data to Azure Data Lake Gen2. I need to create a Year/Month/Day folder dynamically.
file_1.csv
file_2.csv
file_3.csv
.
-
-
file_9.csv
My question: how can I Create a Year/Month/Day folder dynamically transferring from one container to another container?
CodePudding user response:
You can use the following procedure for getting Year/Month/Day folder dynamically.
In my storage account, these are the files.
- Create a copy activity with wild card path.
Then, go to sink -> Open sink dataset and Create dataset parameter with the name folder
.
Go to connection, and added this dynamic content: @dataset().folder
Now, add this dynamic content to the dataset properties value:
@concat(formatDateTime(utcnow(), 'yyyy'), '/',formatDateTime(utcnow(),'MM'),'/',formatDateTime(utcnow(),'dd'),'/')
Pipeline successfully executed and got this output :