To copy and transform data from Azure SQL to MySQL in ADF, data engineers need a reliable and low-code approach for seamless integration. In modern data engineering, integrating and synchronizing data across cloud platforms is essential. Many organizations rely on Azure SQL Database and MySQL for different aspects of their operations, making smooth data transfer and transformation between these systems a critical requirement. Azure Data Factory (ADF) provides a robust solution to achieve this. In this guide, we’ll show you how to copy and transform data from Azure SQL to MySQL in ADF using the Copy Data activity with column transformations—no complex Data Flows required.
Step 1: Assessing Source and Target Tables
Before you build your pipeline, ensure your source and target tables exist and are structured appropriately.
Source Table (Azure SQL Database):
- Table: Employees
- Columns: EmployeeID, FullName, Department, Salary
Example Data:
EmployeeID | FullName | Department | Salary
-----------|-------------|------------|------
1 | John Smith | HR | 4000
2 | Sarah Lee | IT | 5000
Target Table (MySQL):
- Table: EmployeeData
- Columns: EmployeeID, Name, Dept, AnnualSalary
Transformation Requirements:
- Rename FullName to Name
- Rename Department to Dept
- Transform Salary into AnnualSalary by multiplying by 12
After transformation, the MySQL table should look like:
EmployeeID | Name | Dept | AnnualSalary
-----------|-------------|------|-------------
1 | John Smith | HR | 48000
2 | Sarah Lee | IT | 60000
Step 2: Creating Linked Services
Start by configuring Linked Services in ADF, which define connection information for your data sources.
- Go to Manage > Linked Services in ADF Studio.
- Click + New and choose Azure SQL Database as your source. Enter your server, database, and authentication details, and test the connection.
- Repeat the process for Azure MySQL Database, providing server, port (usually 3306), database, and credentials. Test and create the connection.
Step 3: Defining Datasets for Copy and Transform Data from Azure SQL to MySQL
Datasets in ADF represent the structure and location of your data.
- Go to Author > Datasets > + New Dataset.
- Select Azure SQL Database, connect it to your Linked Service, and point it to the Employees table. Name it, e.g., Employees_AzureSQL.
- Create a second dataset for Azure MySQL Database, link to your MySQL Linked Service, and select the EmployeeData table.
Step 4: Building the Copy Data Pipeline with Transformation
With Linked Services and datasets in place, create a pipeline to transfer and transform data.
- Go to Author > Pipelines > + New Pipeline in ADF Studio.
- Drag the Copy Data activity onto the canvas.
- Under the Source tab, select your Azure SQL dataset and enter a custom SQL query to perform the transformations:
SELECT
EmployeeID,
FullName AS Name,
Department AS Dept,
Salary * 12 AS AnnualSalary
FROM Employees;
- In the Sink tab, choose the MySQL dataset as your destination.
- On the Mapping tab, confirm that the transformed columns map correctly to the MySQL table fields.
Step 5: Running and Validating the Pipeline
After configuring your pipeline:
- Click Validate All to check for errors.
- Click Publish All to deploy.
- Trigger the pipeline manually or schedule it for automated runs.
When executed, ADF will copy and transform data from Azure SQL to MySQL in ADF, applying SQL-based transformations on the fly. You can verify the results in MySQL Workbench by querying the EmployeeData table.
Step 6: Conclusion
With this approach, data integration between Azure SQL and MySQL becomes fast, cost-effective, and highly maintainable. By leveraging Azure Data Factory’s Copy Data activity along with in-source SQL queries, you can perform essential column transformations directly within the pipeline — eliminating the need for complex Data Flows or external ETL tools.
This method is ideal for straightforward transformations and regular synchronization tasks, especially when you want to move data efficiently between heterogeneous databases. It also ensures consistency across environments by centralizing transformation logic within ADF, making it easier to monitor, debug, and extend as your data ecosystem evolves.
As your business scales, you can enhance this setup by incorporating dynamic parameters for table names, schema mappings, and incremental loads — enabling reusable and automated pipelines across multiple datasets. Combined with ADF’s scheduling, monitoring, and alerting capabilities, this solution offers a reliable and production-ready approach to cross-database data movement in the Azure ecosystem.
In short, ADF empowers data engineers to build flexible, transformation-ready pipelines with minimal effort, ensuring smooth and automated data flow between Azure SQL and MySQL — the backbone of modern cloud-driven analytics and reporting.
Watch the full video here: