Create a GBase 8a data source to enable Dataphin to read business data from or write data to GBase 8a.
Limits
Only custom global roles with the Create Data Source permission and the system roles super administrator, data source administrator, domain architect, and project administrator can create data sources.
Procedure
-
On the Dataphin homepage, choose Management Hub > Datasource Management from the top navigation bar.
-
On the Datasource page, click +Create Data Source.
-
In the Create Data Source page, in the Relational Database area, select GBase 8a.
If you have recently used GBase 8a, you can also select GBase 8a in the Recently Used section. You can also quickly search for GBase 8a by entering keywords in the search box.
-
On the Create GBase 8a Data Source page, configure the parameters for connecting to the data source.
-
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 the data source in a Flink_SQL node 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 Development method for Dataphin data source tables.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
Description of the GBase 8a data source. Maximum length: 128 characters.
Data Source Configuration
Select a configuration based on whether your business data source separates production and development environments:
-
If the business data source separates production and development, select Production + Development Data Source.
-
If the business data source does not separate production and development, 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 connection information for both environments. If you selected Production data source, configure connection information for the production environment only.
NoteWe recommend that you configure separate data sources for production and development to achieve environment isolation. However, Dataphin also supports using the same data source with identical parameter values for both environments.
For Configuration Method, you can select either JDBC URL or Host. The default selection is JDBC URL.
JDBC URL configuration method
Parameter
Description
JDBC URL
The format of the connection URL is
jdbc:gbase://hosy:port/dbname. For example:jdbc:gbase://192.168.*.212:5258/dataphin.Username and Password
The username and password used to access the database.
Host configuration method
-
Host configuration method
Parameter
Description
Server Address
Enter the IP address and port number of the server.
You can click +Add to add multiple sets of IP addresses and port numbers, and click the
icon to delete excess IP addresses and port numbers. At least one set must be retained.dbname
Enter the database name.
-
Parameter configuration
Parameter
Description
Parameter
-
Parameter name: You can select an existing parameter name or enter a custom parameter name.
Custom parameter names can contain only letters, digits, periods (.), underscores (_), and hyphens (-).
-
Parameter value: When a parameter name is selected, the parameter value is required. It can contain only letters, digits, periods (.), underscores (_), and hyphens (-), and cannot exceed 256 characters in length.
NoteYou can click +Add Parameter to add multiple parameters, and click the
icon to delete excess parameters. You can add up to 30 parameters.Username, Password
The username and password used to log on to the GBase 8a database.
-
NoteWhen the configuration method is set to Host and the data source creation is complete, if you need to switch to the JDBC URL configuration method, the system will concatenate the server IP address and port number into a JDBC URL.
-
-
Configure advanced settings for the data source.
Parameter
Description
socketTimeout
Socket timeout duration in milliseconds. Default: 1,800,000 (30 minutes).
Note-
If you have configured socketTimeout in the JDBC URL, the socketTimeout value in the JDBC URL takes precedence.
-
For data sources created before Dataphin V3.11, the default socketTimeout is
-1, which indicates no timeout limit.
connectTimeout
Connection timeout duration in milliseconds. Default: 900,000 (15 minutes).
Note-
If you have configured connectTimeout in the JDBC URL, the connectTimeout value in the JDBC URL takes precedence.
-
For data sources created before Dataphin V3.11, the default connectTimeout is
-1, which indicates 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 after all retries, the connection attempt fails.
Note-
The default number of retries is 1. You can configure a value between 0 and 10.
-
The connection retry count is applied by default to offline integration nodes and global quality (requires the Asset Quality feature module to be enabled). You can separately configure the retry count at the node level for offline integration nodes.
-
NoteRules for duplicate parameters:
-
If a parameter exists in the JDBC URL, Advanced Settings, and Host Configuration parameter settings, the value in the JDBC URL takes precedence.
-
If a parameter exists in both the JDBC URL and Advanced Settings, the value in the JDBC URL takes precedence.
-
If a parameter exists in both the Advanced Settings and Host Configuration parameter settings, the value in the Advanced Settings takes precedence.
-
-
Select a Default Resource Group. This resource group is used to run tasks related to the current data source, including database SQL, offline database migration, data preview, and more.
-
Click Test Connection or directly click OK to save and complete the creation of the GBase 8a data source.
When you click Test Connection, the system verifies connectivity between the data source and Dataphin. If you click OK directly, the system automatically tests the connection for all selected clusters. Even if all clusters fail the test, the data source is still created.