question

RamaJaddu-5496 avatar image
0 Votes"
RamaJaddu-5496 asked MartinJaffer-MSFT commented

Replace/overwrite using ADF on ADLS

We have ADF pipeline COPY activity to copy the data from Hive to ADLS.
We need replace/overwrite option on ADF copy for file/directory copy to ADLS gen2 .
currently it replaces only if we are inserting/writing with the same filename. we need to replace the old data file/folder with the new data file/folder irrespective of the filename.

azure-data-factory
· 2
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.

@RamaJaddu-5496 did my response help? If not, please provide some more information.

0 Votes 0 ·

If you found your own solution, please share here with community.

0 Votes 0 ·

1 Answer

MartinJaffer-MSFT avatar image
0 Votes"
MartinJaffer-MSFT answered

Hello @RamaJaddu-5496 and welcome to Microsoft Q&A.

If I understand correctly, you want to replace sink folder, and files, even if it has different name.

Suppose sink has contents:

 container
 container/folderX/
 container/folderX/fileX1
 container/folderX/fileX2
 container/folderZ/
 container/folderZ/fileZ1
 container/folderZ/fileZ2

and you want to write

 container/folderNew/
 container/folderNew/Newfile1
 container/folderNew/Newfile2

How would I know which branch to replace? Should folderX or folderZ be replaced? This is unclear.

You can use the Delete activity to remove a folder and all its files.

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.