Configure MySQL in a copy activity
This article outlines how to use the copy activity in Data pipeline to copy data from MySQL.
This connector supports MySQL version 5.5, 5.6, 5.7, 8.0, 8.1 and 8.2.
Supported configuration
For the configuration of each tab under copy activity, go to the following sections respectively.
General
Refer to the General settings guidance to configure the General settings tab.
Source
The following properties are supported for MySQL under the Source tab of a copy activity.
The following properties are required:
- Data store type: Select External.
- Connection: Select a MySQL connection from the connection list. If no connection exists, then create a new MySQL connection by selecting New.
- Use query: Select from Table or Query.
If you select Table:
Table: Specify the name of the table in the MySQL database to read data. Select the table from the drop-down list.
If you select Query:
Query: Specify the custom SQL query to read data. For example:
SELECT * FROM MyTable
.
Under Advanced, you can specify the following fields:
- Additional columns: Add additional data columns to store source files' relative path or static value. Expression is supported for the latter.
Mapping
For Mapping tab configuration, see Configure your mappings under mapping tab.
Settings
For Settings tab configuration, go to Configure your other settings under settings tab.
Table summary
The following tables contain more information about the copy activity in MySQL.
Source information
Name | Description | Value | Required | JSON script property |
---|---|---|---|---|
Data store type | Your data store type. | External | Yes | / |
Connection | Your connection to the source data store. | <your MySQL connection> | Yes | connection |
Use query | The way to read data from MySQL. Apply Table to read data from the specified table or apply Query to read data using SQL queries. | • Table • Query |
Yes | / |
Table | Name of the table in the MySQL database. | < table name > | No | tableName |
Query | Use the custom SQL query to read data. For example: SELECT * FROM MyTable . |
< SQL queries > | No | query |
Additional columns | Add additional data columns to store source files' relative path or static value. Expression is supported for the latter. | • Name • Value |
No | additionalColumns: • name • value |