azureazure-data-factoryazure-file-share

How to copy the fileshare as-is between the storage accounts using ADF Copy data pipeline?


I have the two storage accounts in two different subscriptions and each storage account has only one fileshare. I don't want to give the fileshare names explicitly in the pipeline parameters with the names of source_fs, target_fs as shown in the 1st step of this stack overflow solution.

While creating the Linked Service itself, I have selected the file share.

enter image description here

So, How do I configure the Copy Data Pipeline without this dynamic parameters entering to the piepline. I just need to copy one fileshare data directly between the storage accounts.


Solution

  • It's a file share data, where data can be json or any other formats - In simple it is binary data.

    To achieve your requirement, follow below procedure:

    Here is the source file share data:

    enter image description here

    Create two file share linked services for source and sink as shown below:

    Source linked service:

    enter image description here

    Sink linked service:

    enter image description here

    Create two binary datasets for source and sink as below:

    Source dataset:

    enter image description here

    Sink dataset:

    enter image description here

    Use both linked services as source and sink for copy activity and configure source settings in copy activity as shown below:

    enter image description here

    Debug the pipeline, the data from source file share to target file share successfully as shown below:

    enter image description here