Create an AnalyticDB for MySQL 3.0 data source to enable Dataphin to read business data from or write data to AnalyticDB for MySQL 3.0.
Background information
AnalyticDB for MySQL (formerly known as AnalyticDB) is a cloud computing service developed by Alibaba for real-time high-concurrency analysis of massive data. It enables multidimensional analysis and business exploration on trillions of records in milliseconds. For more information, see AnalyticDB for MySQL - What is AnalyticDB for MySQL.
Permission requirements
Only custom global roles with the Create Data Source permission and system roles such as super administrator, data source administrator, domain architect, and project administrator can create data sources.
Procedure
-
In the top navigation bar of the Dataphin homepage, choose Management Center > Datasource Management.
-
On the Datasource page, click +Create Data Source.
-
On the Create Data Source page, in the Relational Database section, select AnalyticDB for MySQL 3.0.
If you have recently used AnalyticDB for MySQL 3.0, you can also select it from the Recently Used section. You can also enter keywords related to AnalyticDB for MySQL 3.0 in the search box to quickly find it.
-
On the Create AnalyticDB For MySQL 3.0 Data Source page, enter the data source information.
-
Configure the connection parameters between the data source and Dataphin.
Parameter
Description
Datasource Name
The name must meet the following requirements:
-
It can contain only Chinese characters, letters, digits, underscores (_), and hyphens (-).
-
It cannot exceed 64 characters in length.
Datasource Code
After you configure the data source code, you can reference tables in the data source in Flink_SQL tasks by using the format
data source code.table nameordata source code.schema.table name. If you need to automatically access the data source in the corresponding environment based on the current environment, use the variable format${data source code}.tableor${data source code}.schema.table. For more information, see Dataphin data source table development method.ImportantThe data source code cannot be modified after it is configured.
You can preview data on the object details page in the asset directory and asset checklist only after the data source code is configured.
In Flink SQL, only MySQL, Hologres, MaxCompute, Oracle, StarRocks, Hive, SelectDB, and GaussDB data warehouse service (DWS) data sources are currently supported.
Data Source Description
Enter a brief description of the data source. The description cannot exceed 128 characters.
Time Zone
Time-format data in integration tasks is processed based on the selected time zone. The default is Asia/Shanghai. Click Modify to select a different time zone. The options are as follows:
-
GMT: GMT-12:00, GMT-11:00, GMT-10:00, GMT-09:30, GMT-09:00, GMT-08:00, GMT-07:00, GMT-06:00, GMT-05:00, GMT-04:00, GMT-03:00, GMT-03:00, GMT-02:30, GMT-02:00, GMT-01:00, GMT+00:00, GMT+01:00, GMT+02:00, GMT+03:00, GMT+03:30, GMT+04:00, GMT+04:30, GMT+05:00, GMT+05:30, GMT+05:45, GMT+06:00, GMT+06:30, GMT+07:00, GMT+08:00, GMT+08:45, GMT+09:00, GMT+09:30, GMT+10:00, GMT+10:30, GMT+11:00, GMT+12:00, GMT+12:45, GMT+13:00, GMT+14:00.
-
Daylight Saving Time: Africa/Cairo, America/Chicago, America/Denver, America/Los_Angeles, America/New_York, America/Sao_Paulo, Asia/Bangkok, Asia/Dubai, Asia/Kolkata, Asia/Shanghai, Asia/Tokyo, Atlantic/Azores, Australia/Sydney, Europe/Berlin, Europe/London, Europe/Moscow, Europe/Paris, Pacific/Auckland, Pacific/Honolulu.
Data Source Configuration
Select the data source to configure:
-
If your business data source distinguishes between production and development data sources, select Production + Development Data Source.
-
If your business data source does not distinguish between production and development data sources, select Production Data Source.
Tag
You can categorize and tag data sources using tags. For information about how to create tags, see Manage data source tags.
-
-
Configure the connection parameters between the data source and Dataphin.
If you selected Production + Development Data Source, configure the connection information for both environments. If you selected Production Data Source, configure only the production connection information.
NoteWe recommend configuring separate production and development data sources to achieve environment isolation. However, Dataphin also supports configuring them as the same data source with identical parameter values.
Parameter
Description
JDBC URL
The format of the connection address is
jdbc:mysql//host:port/dbname.Username, Password
The username and password of the database.
-
Configure advanced settings for the data source.
Parameter
Description
connectTimeout
The connection timeout of the database, in milliseconds. Default: 900000 (15 minutes).
Note-
If you have included a connectTimeout configuration in the JDBC URL, the connectTimeout will be the timeout value configured in the JDBC URL.
-
For data sources created before Dataphin V3.11, the default connectTimeout is
-1, indicating no timeout limit.
socketTimeout
The socket timeout of the database, in milliseconds. Default: 1800000 (30 minutes).
Note-
If you have included a socketTimeout configuration in the JDBC URL, the socketTimeout will be the timeout value configured in the JDBC URL.
-
For data sources created before Dataphin V3.11, the default socketTimeout is
-1, indicating no timeout limit.
-
-
-
Select Default Resource Group, which is used to run tasks related to the current data source, including database SQL, offline database migration, data preview, and more.
-
Perform a Connection Test or directly click OK to save and complete the creation of the AnalyticDB for MySQL 3.0 data source.
Click Connection Test to verify connectivity between the data source and Dataphin. If you click OK directly, the system automatically tests the connection for all selected clusters, but the data source is still created even if the connection test fails.
Test Connection tests the connection for the Default Cluster or Registered Scheduling Clusters that have been registered in Dataphin and are in normal use. The Default Cluster is selected by default and cannot be deselected. If there are no resource groups under a Registered Scheduling Cluster, connection testing is not supported. You need to create a resource group first before testing the connection.
-
The selected clusters are used only to test network connectivity and are not used for running tasks.
-
The test connection usually completes within 2 minutes. If it times out, click the
icon to view the reason and retry. -
Regardless of the test result (Connection Failed, Connection Successful, or Succeeded With Warning), the system records the timestamp of the final result.
NoteOnly the test results for the Default Cluster include three connection statuses: Succeeded With Warning, Connection Successful, and Connection Failed. The test results for Registered Scheduling Clusters in Dataphin only include two connection statuses: Connection Successful and Connection Failed.
-
When the test result is Connection Failed, click the
icon to view the failure reason. -
When the test result is Succeeded With Warning, the application cluster connection succeeded but the scheduling cluster connection failed. The data source cannot be used for data development and integration. Click the
icon to view the log information.
-