This topic describes how to use the ApsaraDB RDS for MySQL connector.
ApsaraDB RDS for MySQL is developed based on a branch of MySQL and provides excellent performance. ApsaraDB RDS for MySQL is a tried and tested solution that handled the high-volume concurrent traffic during Double 11. ApsaraDB RDS for MySQL provides basic features such as whitelist configuration, backup and restoration, Transparent Data Encryption (TDE), data migration, and management of instances, accounts, and databases. For more information about ApsaraDB RDS for MySQL, see ApsaraDB RDS for MySQL database.
Important
The ApsaraDB RDS for MySQL connector will not be supported in the future. We recommend that you use the MySQL connector instead of the ApsaraDB RDS for MySQL connector. For more information about how to use the MySQL connector, see MySQL.
The following table describes the capabilities supported by the ApsaraDB RDS for MySQL connector.
Item | Description |
Table type | Sink table and dimension table |
Running mode | Batch mode and streaming mode |
Data format | N/A |
Metric | Note For more information about the metrics, see Metrics. |
API type | SQL |
Data update or deletion in a sink table | Supported |
Limits
Only Realtime Compute for Apache Flink that uses Ververica Runtime (VVR) 2.0.0 or later supports the ApsaraDB RDS for MySQL connector.
The ApsaraDB RDS for MySQL connector supports only ApsaraDB RDS for MySQL databases.
The at-least-once semantics can be used. If an ApsaraDB RDS for MySQL sink table contains a primary key, idempotence can be used to ensure data correctness.
We recommend that you use the latest version of Realtime Compute for Apache Flink to ensure high performance and stability. For example, you can use Realtime Compute for Apache Flink that uses VVR 6.X or later.
Precautions
The ApsaraDB RDS for MySQL connector will be phased out in the future. We recommend that you use the MySQL connector if the MySQL connector can meet your business requirements. For more information, see MySQL.
Parameters in the WITH clause
Data type mappings
Data type of Flink | Data type of ApsaraDB RDS for MySQL |
Data type of Flink | Data type of ApsaraDB RDS for MySQL |
BOOLEAN | BOOLEAN |
TINYINT | TINYINT |
TINYINT(1) Note Only dimension tables support this mapping. | BOOLEAN |
SMALLINT | SMALLINT |
SMALLINT | TINYINT UNSIGNED |
INT | INT |
INT | SMALLINT UNSIGNED |
BIGINT | BIGINT |
BIGINT | INT UNSIGNED |
DECIMAL(20,0) | BIGINT UNSIGNED |
FLOAT | FLOAT |
DECIMAL | DECIMAL |
DOUBLE | DOUBLE |
DATE | DATE |
TIME | TIME |
TIMESTAMP | TIMESTAMP |
VARCHAR | VARCHAR |
VARBINARY | VARBINARY |