I would like to copy some files from one storage account to another. Also, I would like to set the access tier of the target files to cold
.
I tried to do this with the Azure Data Factory as described here:
https://learn.microsoft.com/en-us/azure/data-factory/quickstart-hello-world-copy-data-tool
It generally does work, except that I am not able to define the target access tier.
How can I defined that all my copied files are stored with the access tier cold
using the Azure Data Factory?
2
Answers
AFAIK, In ADF copy activity or copy data tool, there is no option to specify the access tier of the storage account while copying.
You can submit your idea as a feature request here.
As a workaround, you can try the below approach.
x-ms-access-tier
tocold
in the web activity headers.@item().name
for the file name in the web activity URL which changes the access tier for every file in the target location.Go through the similar SO answer by @KarthikBhyresh-MT.
You cannot do this with ADF copy activity only, you can however use logic app or even a function after adf copy cycle is done. Inside the Logic App or Function, use SDK or REST API calls to set the access tier of the copied files in the target storage account to cold.
You can combine a function as a dependency to the original copy data activity (to run on success), so that it runs right after your copy. In this way you stay inside ADF, and wont have to use the logic app. Use either of these options.