Master Child Table from Flat file by using ADF Data Flow
Introduction
In this blog post, we are trying to
split a flat file and put the value in two different table of Azure SQL Server.
I think if we have the knowledge in SSIS, using data flow is very easy. By
using data flow, we got the ETL solution as we can use different transformation
to process data and finally store it in destination.
Hope it will be interesting.
Case scenario
We have a flat file contains data. We need to segregate records
from it like master child table.
Destination
( Azure SQL Table)
ADF Solution
We have a single Pipeline which has one Activity named Mapping Data Flow Activity which just calls
our Data Flow.
Data
Flows Structure
First data flow we are using for our Master table. It just store
the distinct records in our master table named [Customer]
Second data flow we are using for Transaction table named
[SalesOrder]
Master
Table Data Flow
Source
Select
Transform
For [Customer] table we need only [CustomerID] and [CustomerName]
columns. Others columns need to be removed as in next step we are Going to Aggregate Transform.
Here we are taking [Qty] as extra columns as in Aggregate trans
form we going to Group By the [CustomerID] and [CustomerName] and SUM() of
[Qty] as Aggregate needs a Aggregate function in this transform. We are not
going to Sink [Qty] in our destination.
Aggregate
Transform
Sink
Transaction Table Data Flow
It is the same concept as master. We just connect source and
select desired columns and sink.
Output
We run this Data Flow from our Pipeline using Mapping Data Flow Activity
Hope you like it.
Comments
Post a Comment