Create a SelectDB data source in Dataphin to read business data from or write data to SelectDB.
Background information
SelectDB is a data warehouse for real-time report analysis, ad hoc multidimensional analysis, log retrieval analysis, data federation, and query acceleration. It provides high-performance, easy-to-use data analysis services.
Permissions
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
-
On the Dataphin homepage, click Management Hub > Datasource Management in the top navigation bar.
-
On the Datasource page, click +Create Data Source.
-
In the Create Data Source page, select SelectDB from the Big Data section.
If you have recently used SelectDB, you can also select it from the Recently Used section. You can also enter SelectDB keywords in the search box to quickly search for it.
-
On the Create SelectDB Data Source page, configure the connection parameters.
-
Configure the basic information of the data source
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 Flink_SQL tasks using the format
data_source_code.tableordata_source_code.schema.table. To automatically access the data source in the matching environment, use the format${data_source_code}.tableor${data_source_code}.schema.table. For more information, see Flink_SQL task development.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.
Kernel Version
You can select Cloud Core V3.0.x (based On Apache Doris V2.0.x) or Cloud Core V4.0.x (based On Apache Doris V3.0.x).
Data Source Description
Enter a brief description of the data source. The description cannot exceed 128 characters.
Data Source Configuration
Select the data source configuration type:
-
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
Categorize data sources using tags. For information on how to create tags, see Manage data source tags.
-
-
Configure the connection parameters between the data source and Dataphin.
If you select Production + Development data source, configure the connection information for both environments. If you select Production data source, configure the connection information for the production environment only.
NoteWe recommend configuring production and development data sources separately to achieve environment isolation. However, Dataphin also supports configuring them as the same data source with identical parameter values.
Parameter
Description
JDBC URL
Enter the JDBC URL for SelectDB in the format
jdbc:mysql://host:port/dbname.Username, Password
The username and password to access the database.
FE Node URL
The host and HTTP port of the FE (Front End) nodes, in the format
fe_host:http_port,fe_host:http_port. Separate multiple FE nodes with commas (,). The default HTTP port for SelectDB is 8030. -
Configure advanced settings for the data source.
Parameter
Description
connectTimeout
The connection timeout duration in milliseconds. Default: 900000 (15 minutes).
Note-
If a connectTimeout value is specified in the JDBC URL, that value takes precedence.
-
For data sources created before Dataphin V3.11, the default connectTimeout is
-1, which means no timeout limit.
socketTimeout
The socket timeout duration in milliseconds. Default: 1800000 (30 minutes).
Note-
If a socketTimeout value is specified in the JDBC URL, that value takes precedence.
-
For data sources created before Dataphin V3.11, the default socketTimeout is
-1, which means no timeout limit.
Connection Retries
If the database connection times out, the system automatically retries until the specified retry count is reached. If the connection still fails, it is considered failed.
Note-
The default number of retries is 1. You can configure a value between 0 and 10.
-
The connection retry count applies by default to offline integration tasks and global quality (requires the asset quality function module to be enabled). You can configure task-level retry counts separately in offline integration tasks.
-
-
-
Select a Default Resource Group. This resource group runs tasks related to the current data source, such as database SQL, offline database migration, and data preview.
-
Perform a Test Connection or click OK to save the SelectDB data source.
Click Test Connection to verify connectivity between the data source and Dataphin. If you click OK directly, the system tests the connection for all selected clusters automatically. The data source can still be created even if all clusters fail the connection test.