PolarDB is a next-generation relational database of Alibaba Cloud. PolarDB is fully compatible with MySQL. PolarDB can expand its storage space to up to 100 TB, deploy up to 16 nodes in each cluster, and improve performance six times higher than MySQL. This makes PolarDB suitable for various database scenarios. Data Lake Analytics (DLA) serves as a hub of cloud data processing. It allows you to create a PolarDB schema and use a MySQL client or MySQL command-line tool to connect to DLA. Then, you can read data from and write data to a PolarDB database by using SQL statements.
Preparations
Before you use DLA to read data from and write data to a PolarDB database, perform the following operations to prepare test data in the database:
- Purchase a pay-as-you-go cluster.
Notice
- DLA and PolarDB must be deployed in the same region.
- DLA connects to the PolarDB database over a virtual private cloud (VPC). We recommend that you select VPC as the network type when you create a PolarDB cluster.
- Configure a whitelist for a cluster.
- Connect to a PolarDB for MySQL cluster.
- Write test data to a table in the PolarDB database.
In this topic, the person table is created in the PolarDB database and test data is written to this table.
CREATE TABLE person ( id int(11) NOT NULL, name varchar(1023) NOT NULL, age int(11) NOT NULL, PRIMARY KEY (id) ) insert into person values (1, 'james', 10), (2, 'bond', 20), (3, 'jack', 30), (4, 'lucy', 40);
Usage notes
Before you connect DLA to a PolarDB database, you must add the Classless Inter-Domain
Routing (CIDR) block 100.104.0.0/16
to a whitelist of the PolarDB cluster. For more information, see Configure a whitelist for a cluster.
Your PolarDB cluster resides in a VPC. By default, DLA cannot access resources in
the VPC. To enable DLA to access your PolarDB database, you must use the reverse access
technique of the VPC. You must add the CIDR block 100.104.0.0/16
to a whitelist of your PolarDB cluster.
100.104.0.0/16
to the whitelist of your PolarDB cluster, you can use the reverse access technique
to read data from and write data to your PolarDB database.