Step-by-Step Data Migration from On-Premises to Cloud: Connecting Your Data with Power BI

Sapana Taneja
Microsoft Power BI
Published in
5 min readJul 2, 2024

This article outlines the process of migrating data from on-premises to the cloud and how to integrate that data with Power BI.

Data Migration from On-Prem to Cloud
Flow chart of Data Migration Pipeline

Step :-1 Create a resource on the cloud -ADF(Azure Data Factory), Azure SQL Database.

Step:- 2 To create a pipeline for establishing a linked service to connect MySQL to Data Factory, and Data Factory to SQL Database.

Step 3:- Trigger the pipeline.

Step 4:- Connect the data from the Cloud SQL database to Power BI.

Steps to Create Data Factory and SQL Database

Create a resource

Search for Data Factory and you will find it

Data Factory

After filling out the form you will create your data factory

when we click on the go-to resource and the next page click on Azure Studio we will get the Data Factory window

DF window

by clicking on the left pencil button we can see the option to create the pipeline and then give the name of that pipeline and drag the copy data option in the blank window now the main task is to connect with the source is MYSQL and Sink that is our Azure SQL Database .

For that, we will create a sink database where we store data after loading it onto the cloud. for that again we will create a resource for SQL Database.

SQL Database

After filling out the form for the SQL database on the cloud, we will get the SQL database once the deployment is complete. Go to the resources, click on Query Editor, and log in with the username and password provided during the SQL database creation.

SQL Database Window

and we can see that right now there is no table in the table folder.

SQL Database workspace

Now, We have successfully created a Data Factory and SQL Database on the Cloud.

Step:- 2

Next, to create a pipeline in the Data factory we will create a link service to connect MYSQL to ADF

Connection with Source

Now comes the interesting part: we need to establish a connection between on-premises and the cloud. For this, we need to set up integration. If we are integrating within Azure, we will use the Auto-Resolve Integration Runtime. Otherwise, for non-Azure sources, we will use the Self-Hosted Integration Runtime. For that, we have to install Microsoft Integration Runtime from https://www.microsoft.com/en-us/download/details.aspx?id=39717

After installation of Microsoft Integration Runtime, we will find the below window

Microsoft Integration Runtime

Once the self-hosted integration is configured, we will test the connection by entering valid credentials.

Test connection of linked service

After establishing the connection we will select the table from MYSQL database

Selection of table from MySQL db

For storing the in Cloud SQL we will create the link service from ADF to Azure SQL Database

Sink Linkage Service
Test connection Successful

After creating the Pipeline and input and output dataset we will publish it all in ADF

Publishing pipeline and datasets

Step :-3

To run the pipeline we will click on add trigger.

Pipeline in process

Once the pipeline runs successfully, our table will be migrated from MySQL to the Azure SQL Database.

Step :- 4

Now, we will connect the data from Azure SQL Database to Power BI

Get data from Azure SQL database

Give the server name, user name, and password that we have given at the time of creation of the Azure SQL Server.

Finally, we have successfully loaded data into Power BI

Data loaded in Power BI

Conclusion:-

following these steps, you can easily move your data from on-premises to the cloud. This process saves money and makes managing data more efficient. Using Azure Data Factory and Power BI helps connect your data and get real-time insights. Moving to the cloud improves flexibility and supports your business needs as it grows.

Hope this article helps you understand the process. If you found it helpful, please clap and share your feedback.

Happy Learning…!!!

Don’t forget to subscribe to

👉 Power BI Publication

👉 Power BI Newsletter

and join our Power BI community

👉 Power BI Masterclass

--

--

Sapana Taneja
Microsoft Power BI

I'm passionate about unveiling data stories. I have keen interest in EXCEL, Python, SQL, Power BI, Tableau. Join me in exploring the captivating world of data!