Skip to main content

Data moving to/from Azure Storage using Azure Data Factory and Copy Activity

This post covers how we can use Azure Data Factory to copy our data from one location to another.
Even if the copy activity might sound like a basic task that is not complex or challenging when you need to move 10 TB or 50 TB of data from one storage to another, things are becoming interesting. Reliability, resume and continue, task parallelization, data consistency are becoming essential for your project.
There are multiple solutions on the market that helps you to move data to and from Azure or between different Azure locations. Today we will focus on Azure Data Factory and how it can help us to our job better.
Azure Data Factory it is a service created to help us to work with data when we need to store, process and move it, without having to things about anything else.

Inside Azure Data Factory there we have an activity called Copy Activity that can be used to move (copy) data from source to another. When we talk about Azure Data Factory, we call:
  • Source the repository from where we read data
  • Sink the repository where we write data
  • IR is the Integration Runtime that allows us to run/execute custom code

The copying activity inside Azure Data Factory runs inside Azure IR, meaning that we already have a scalable and reliable environment where we can execute our copy action. A flavor of Azure IR that allows us to host yourself this activity is Self-Hosted IR used when we are working with high secure VNETS or on-premises storages.
The power of IR are the activities that can be done besides the copy activity itself, that is reliable and scalable. Inside the pipeline, we can do any other activities related to data serialization, compression or data transformation and mapping. This is super useful when data needs to be consolidated in different ways at the destination repository (sink).
The list of Azure repositories that are available for copy activities can be found on the following link https://docs.microsoft.com/en-us/azure/data-factory/copy-activity-overview and covers most common data repositories including (NoSQL and SQL data storages).
If you don’t need to do any data transformation, you can get with just a few clicks a solution that can move data super fast. When you need to do data transformation, you shall remember that there is native support for JSON, Text, Parquet, ORC and Avro format in combination with ZipDeflate, BZip2, Deflate and Gzip compression.

When you use Azure Data Factory, you will pay only for the resources that you are consuming at the moment when you do the copy activity. Beside this, we can specify the actions that need to be executed at the moment when an error occurs. For example, if there is an incompatibility between two data format of a specific file, you can decide to skip and log the fault.
The performance of copy activity it is well documented, allowing us to be able to estimate better how long it takes to do different actions and set clear expectation related to performance. For example, the copy activity from Azure Blob to another Azure Blob si 105Mbps when you have 8 DMUs (unit measure for Azure Data Factory).

The copying activity has support for incremental and delta copies. This means that you can copy only new content from one location to another, without having to develop a custom mechanism that detects changes.
When you copy content to/from Azure Blob Storage, you can specify how data will land on the other side. For example, you can specify if you want to persist the original file structure or to copy content in a flat location or to generate from all the files only a huge file.

Conclusion

Azure Data Factory it is a good option when we need to do copy activities from different data sources. It is helping us to focus on our needs and less on the infrastructure. For data moving from/to Azure Storage I highly recommend to take a look on Copy functionality of it. 

Comments

Popular posts from this blog

Windows Docker Containers can make WIN32 API calls, use COM and ASP.NET WebForms

After the last post , I received two interesting questions related to Docker and Windows. People were interested if we do Win32 API calls from a Docker container and if there is support for COM. WIN32 Support To test calls to WIN32 API, let’s try to populate SYSTEM_INFO class. [StructLayout(LayoutKind.Sequential)] public struct SYSTEM_INFO { public uint dwOemId; public uint dwPageSize; public uint lpMinimumApplicationAddress; public uint lpMaximumApplicationAddress; public uint dwActiveProcessorMask; public uint dwNumberOfProcessors; public uint dwProcessorType; public uint dwAllocationGranularity; public uint dwProcessorLevel; public uint dwProcessorRevision; } ... [DllImport("kernel32")] static extern void GetSystemInfo(ref SYSTEM_INFO pSI); ... SYSTEM_INFO pSI = new SYSTEM_INFO(...

How to audit an Azure Cosmos DB

In this post, we will talk about how we can audit an Azure Cosmos DB database. Before jumping into the problem let us define the business requirement: As an Administrator I want to be able to audit all changes that were done to specific collection inside my Azure Cosmos DB. The requirement is simple, but can be a little tricky to implement fully. First of all when you are using Azure Cosmos DB or any other storage solution there are 99% odds that you’ll have more than one system that writes data to it. This means that you have or not have control on the systems that are doing any create/update/delete operations. Solution 1: Diagnostic Logs Cosmos DB allows us activate diagnostics logs and stream the output a storage account for achieving to other systems like Event Hub or Log Analytics. This would allow us to have information related to who, when, what, response code and how the access operation to our Cosmos DB was done. Beside this there is a field that specifies what was th...

Cloud Myths: Cloud is Cheaper (Pill 1 of 5 / Cloud Pills)

Cloud Myths: Cloud is Cheaper (Pill 1 of 5 / Cloud Pills) The idea that moving to the cloud reduces the costs is a common misconception. The cloud infrastructure provides flexibility, scalability, and better CAPEX, but it does not guarantee lower costs without proper optimisation and management of the cloud services and infrastructure. Idle and unused resources, overprovisioning, oversize databases, and unnecessary data transfer can increase running costs. The regional pricing mode, multi-cloud complexity, and cost variety add extra complexity to the cost function. Cloud adoption without a cost governance strategy can result in unexpected expenses. Improper usage, combined with a pay-as-you-go model, can result in a nightmare for business stakeholders who cannot track and manage the monthly costs. Cloud-native services such as AI services, managed databases, and analytics platforms are powerful, provide out-of-the-shelve capabilities, and increase business agility and innovation. H...