On-premises MySQL Database to Azure SQL Database
On-premises MySQL Database to Azure SQL Database
To Migrate structured data from an on-premises MySQL database to Azure SQL Database using a
secure, dynamic, and reusable pipeline architecture built with Azure Data Factory (ADF).
PROJECT ARCHITECTURE:
RESOURCES REQIURED:
Example:
DATASET CREATION:
SOURCE:
SINK:
USECASE:II
PROBLEM:
• 1 pipeline
• 2 datasets(but during the pipeline run time we need to give table name manually)
• IMPLEMENTATION STEPS:
o SOURCE:
▪ Dataset:
o Inputdata
o Linkedservice:
▪ Mysql2adf_ls
• TableName
o car_data
o SINK:
▪ Dataset:
o Outputdata
▪ Linkedservice:
• Adf2sql_ls
o TableName:
o Input Data:
o Parameters:
o Name: OnpremTableName
o Output Data:
o Parameters:
o Name: TargetTableName
o Input Data:
o 1. Move Car_Data:
Output:
o 2. Move Electronic_Data:
Source:
Sink:
o 3. Move Sales_Data:
Source:
Sink:
USECASE3:
SOURCE:
SINK:
• If my table has 50 tables,1 copy activity should run 50 time because of 50 tables.
• We need:
o 1 copy activity.
Lets do it how:
• In mysql we have 22 tables.we need to copy all the tables in a single go.
Where table_schema=”amazon_db”
CREATE DATASET:
CREATE LS:
• We are getting the tablename of first table, but we need the names for all the tables.
Output: output of every activity will generate the JSON file as a output.
Table count : 22
Step2: we need to pass all the tables name one by one to copy activity, for that we need for
each activity.
If we are doing lookup to copy, only first table name will be passed. But we need all the
tables name.
Iteration-→for each
Double click the for each now add the copy activity
Source:
Target: sink:
Sink:
Will fail.so need to give as follow.