Create a DolphinDB data source so that Dataphin can read business data from DolphinDB.
Permissions
Only custom global roles with the Create Data Source permission and the super administrator, data source administrator, domain architect, and project administrator roles can create data sources.
Procedure
-
On the Dataphin home page, choose Management Center > Datasource Management from the top menu bar.
-
On the Datasource page, click + New Data Source.
-
On the New Data Source page, in the Big Data section, select DolphinDB.
If you recently used DolphinDB, you can also select it from the Recently Used section, or enter DolphinDB in the search box to find it.
-
On the New DolphinDB Data Source page, configure the connection parameters.
-
Configure the basic information for the data source.
Parameter
Description
Datasource Name
Enter a name for the data source. The name must meet the following requirements:
-
Can contain only Chinese characters, uppercase and lowercase letters, digits, underscores (_), and hyphens (-).
-
Cannot exceed 64 characters in length.
Datasource Code
Once configured, you can access Dataphin data source tables in Flink_SQL nodes or by using the Dataphin Java Database Connectivity (JDBC) client. Use the format
datasource_code.table_nameordatasource_code.schema.table_namefor quick access. To automatically switch data sources based on the task execution environment, use the variable format${datasource_code}.tableor${datasource_code}.schema.table. For more information, see Develop with 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.
Version
Currently, only v2.00.11.2 is supported.
Data Source Description
A brief description of the DolphinDB data source. The description cannot exceed 128 characters.
Data Source Configuration
Select a configuration mode based on whether your business data source separates production and development environments:
-
If it does, select Production + Development Data Source.
-
If it does not, select Production Data Source.
Tag
You can add tags to classify the data source. For more information about how to create tags, see Manage data source tags.
-
-
Configure the connection parameters between the data source and Dataphin.
If you set Data Source Configuration to Production + Development Data Source, you must configure the connection information for both the production and development environments. If you set it to Production Data Source, you only need to configure the connection information for the production data source.
NoteProduction and development data sources are typically different to isolate environments and prevent development activities from affecting the production system. However, Dataphin also supports using the same data source for both, which requires identical parameter values.
Parameter
Description
Server Address
Enter the IP address and port number of the server. Only one server address is supported.
Database
Enter the database path (DatabasePath).
Parameter Checking (Optional)
Click + Add Parameter to add a row. Enter the Parameter Name and its corresponding Parameter Value. Click the
icon in a row to delete the parameter.The parameter name and value can contain uppercase and lowercase letters, digits, periods (.), underscores (_), and hyphens (-). The length cannot exceed 256 characters.
Username, Password
Enter the username and password (or credential) for authentication. Ensure the user has the required data permissions so that nodes run correctly.
Connection Retries
If the database connection times out, the system retries automatically until the specified retry limit is reached. If the connection still fails after all retries, the connection attempt fails.
Note-
The default number of retries is 1. You can set this parameter to a value from 0 to 10.
-
Connection retries apply by default to offline integration nodes and global quality (requires the Asset Quality module). For offline integration nodes, you can configure the retry count at the node level.
-
-
-
Select a Default Resource Group. This resource group is used to run tasks related to the data source, such as database SQL tasks, offline full database migration, and data preview.
-
Click Test Connection or OK to save the configuration and create the DolphinDB data source.
Clicking Test Connection verifies the connection between the data source and Dataphin. If you click OK directly, the system automatically tests the connection to all selected clusters. The data source can be created even if the connection tests for the selected clusters fail.