Skip to main content

Azure Data Factory (Day 28 of 31)

List of all posts from this series:

Short Description 
Azure Data Factory is one of the services that is part of data analytics functionality offered by Microsoft Azure. This service can be used with success when you need to orchestrate and manage data movement and different data transformation.

Main Features 
Move data between different sources
Using Azure Data Factory you can move data between different storages, from the file based one, to SQL and even NoSQL storages. This can be very useful when you need to change the location of data to be able to process or store it for long time.
On-premises and Cloud
The data storage used as input or output can be not only on Microsoft Azure but also in another storages that can be on-premises.
Data Source Aggregation
We have the ability to combine multiple data sources in only one data sources. In this way we can easily merge different data sources.
Data Processing
All the input data sources can be processed and base transformation functions can be applied on them. In this way we can monitor our data.
Complex data transformation
Data Factory supports complex transformations functions, being able to use external components like Pig, Hive, HDInsight or C# libraries.
There is full support for custom behaviors and fault-tolerance. We have the ability to manage clusters, change the retry policy, the alert rules and timeouts policy.
The management of pipelines can be made using different tools from PowerShell scripts to .NET libraries.
Data processing and pipeline management can be managed easily using a simple workflow UI. Using this workflow the pipeline configuration is very simple.
Linked Services
A linked service is represented by an external data source like a blob storage or a SQL database. A linked resources can be also a computing service. We can link one or more linked services.
Input/Output Tables
It is a rectangular dataset that is used for data that are coming to Data Factory or that are produced by it. This tables are produces from the linked resources data stored and can be persistent in external data sources. The JSON format is used for this tables.
A pipeline is an action that is executed over inputs table and produce some data in the output table(s). Over the this data we can apply different processing and transformation operations.

One of the current limitations is the on-premises storages type that is supported in this moment. Now, only SQL Server is supported for on-premises sources.

Applicable Use Cases 
Below you can find some use cases when I would use Azure Data Factory.
Logs file processing
Logs can be produced by multiple data sources and can be stored in different data sources. We can use Azure Data Factory to fetch data from all data sources and combine all this logs in only one location, having the same format of data.
Transform data to the same format
If we work with different legacy system we will have data in different formats. Data Factory can be used with success to aggregate all this data and transform to a common format.

Code Sample 
A great sample can be found on the fallowing address:

Pros and Cons 
Integration with on-premises data sources
Support multiple data sources
Aggregation and transformation of data can be made easily
In this moment there is no support for other on-premises data sources except SQL Server.

If you want to calculate the cost of Azure Data Factory you should take into account:

  • Number of activities
  • Outbound traffic (from on-premises data sources)
  • Run on Azure data sources or on-premises 

Azure Data Factory is an interesting services that can be used with success when you need to manage and orchestrate data from different data sources and formats.


Popular posts from this blog

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine:
threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration:

TeamCity.NET 4.51EF 6.0.2VS2013
It seems that there …

Entity Framework (EF) TransactionScope vs Database.BeginTransaction

In today blog post we will talk a little about a new feature that is available on EF6+ related to Transactions.
Until now, when we had to use transaction we used ‘TransactionScope’. It works great and I would say that is something that is now in our blood.
using (var scope = new TransactionScope(TransactionScopeOption.Required)) { using (SqlConnection conn = new SqlConnection("...")) { conn.Open(); SqlCommand sqlCommand = new SqlCommand(); sqlCommand.Connection = conn; sqlCommand.CommandText = ... sqlCommand.ExecuteNonQuery(); ... } scope.Complete(); } Starting with EF6.0 we have a new way to work with transactions. The new approach is based on Database.BeginTransaction(), Database.Rollback(), Database.Commit(). Yes, no more TransactionScope.
In the followi…

GET call of REST API that contains '/'-slash character in the value of a parameter

Let’s assume that we have the following scenario: I have a public HTTP endpoint and I need to post some content using GET command. One of the parameters contains special characters like “\” and “/”. If the endpoint is an ApiController than you may have problems if you encode the parameter using the http encoder.
using (var httpClient = new HttpClient()) { httpClient.BaseAddress = baseUrl; Task<HttpResponseMessage> response = httpClient.GetAsync(string.Format("api/foo/{0}", "qwert/qwerqwer"))); response.Wait(); response.Result.EnsureSuccessStatusCode(); } One possible solution would be to encode the query parameter using UrlTokenEncode method of HttpServerUtility class and GetBytes method ofUTF8. In this way you would get the array of bytes of the parameter and encode them as a url token.
The following code show to you how you could write the encode and decode methods.