Simultaneously Loading Multiple CSV files to Different Destination Table
Introduction
In this blog post, we are trying to load a bunch of CSV file from Azure Blob Storage to Different Destination Table of Azure SQL Server. Here we are not using any one to one mapping. All activities must be done in a single pipeline and single Copy Data Activity.
Hope it will be interesting.
Case Scenario
In our Azure Blob storage, we have different CSV file with different metadata. We need to store them in our Azure SQL Server table. One file is for one table. The table is created automatically, so there is no column mapping over here.
Source Azure Blob Files
ADF Solution
First we need two Data Sets. One for retrieving all CSV files information from Blob Storage and Second is for copy the each file contain in destination. With this destination Data sets create table automatically for each CSV file.
Data Sets-1 (Used to Retrieve
all File From Blob Storage)
Data Sets-2 (Destination
Data Sets for SQL Table Creation and Storing CSV Data)
Get Meta Data Activity
ForEach Loop Activity
Copy Data Activity
It is inside the ForEach Loop activity
Output
Consideration
If we check the Table definition, all the columns have data type nVARCHAR(max)
Hope you like it.
Comments
Post a Comment