skip to Main Content

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


  1. 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.

    • As your source is a storage account, First copy your files from source storage account to target container.
    • After that, get the list of files using Get Meta data activity from target location.
    • Give that to ForEach activity, and inside ForEach activity web activity with Set Blob Tier. Set the x-ms-access-tier to cold in the web activity headers.
    • Use the @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.

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search