In this article, we will walk through the steps of creating a Storage Account and Azure Data Factory (ADF) to move a file from one folder to another within the Storage Account using ADF activities. We will also explore the need for a Storage Account and Resource Group in this process.

Why Do We Need a Storage Account and Resource Group

A Storage Account is essential for storing your files, blobs, and other data in Azure. It acts as a centralized repository for data and can be accessed by multiple Azure services, including Azure Data Factory (ADF). The Resource Group (RG) is a container that holds related resources for your solution, such as Storage Accounts and Data Factories. Grouping resources together within an RG allows for easier management and organization of related resources.

Step 1. Create a Storage Account.

Step 2. Create Folders Inside the Container.

In the Azure portal, folders cannot be created directly. However, you can use Azure Storage Explorer (desktop or web version) to create folders. In this demo, I created two folders: Input and Output. I also uploaded a sample .csv file to the Input folder.

 Azure portal

Items

Step 3. Create Azure Data Factory.

Now that we have our storage container set up, we’ll focus on creating an Azure Data Factory instance to orchestrate file movement.

Step 4. Add Activities to the Pipeline.

To move the file from the Input folder to the Output folder, we’ll use two activities: Copy Activity and Delete Activity.

Add the Copy Activity

Add the Sink (Destination) Dataset

In the Sink tab, create a separate dataset for the destination (Output folder). You can reuse the same Linked Service and follow the same process for dataset creation.

Add the Delete Activity

The Copy Activity only copies the file, it doesn’t delete the original file from the source. To delete the file from the Input folder after it’s copied, we’ll use the Delete Activity.

Step 5. Publish and Trigger the Pipeline.

Step 6. Validate the Results.

After the pipeline runs, you can verify the results.

Conclusion

In this demo, we have successfully.

I hope this article helps you understand the process of moving files using Azure Data Factory. In my next article, I will explain what Azure Data Factory is and its key components.

Stay tuned!