question

balaa-uk avatar image
0 Votes"
balaa-uk asked balaa-uk commented

How can I move a file from one folder to another?

I am using ADF to process data that is dropped on to a container/folder. Once the file is available ADF will consume it and load it to a SQL Table using Copy activity. At the end of pipeline run, I need to move that file to a different container instead of deleting it. Which activity helps in this scenario?

azure-data-factory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

KranthiPakala-MSFT avatar image
1 Vote"
KranthiPakala-MSFT answered balaa-uk commented

Hi @balaa-uk ,

Thanks for reaching out. After copying file data from Container to SQL table, have another subsequent Copy Activity and create a new Binary data set which points to the original file which you would want to copy to different container as shown below. This will make a copy of the file in desired destination but the source container/folder will still have the source file.

In case if you want to delete the source file from original source (which is nothing but moving file) after copying to another archive folder or container then you will need to use binary dataset which will have deleteFilesAfterCompletion property and that needs to be set to true.

79336-image.png

Additional info: Please refer to this MS doc: Move files with Azure Data Factory

Hope this info helps. Do let us know if you have further query.



Please don’t forget to Accept Answer and Up-Vote wherever the information provided helps you, this can be beneficial to other community members.




image.png (53.0 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Wow. Amazing!

0 Votes 0 ·