All Products
Search
Document Center

Dataphin:Create a KingbaseES data source

Last Updated:Nov 19, 2025

This topic describes how to create a KingbaseES data source, which allows Dataphin to read business data from or write data to KingbaseES.

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

  1. On the Dataphin homepage, choose Management Hub > Datasource Management from the top menu bar.

  2. On the Datasource page, click +Create Data Source.

  3. On the Create Data Source page, select KingbaseES from the Relational Database section.

    If you have recently used KingbaseES, you can also select it from the Recently Used section. Alternatively, you can enter keywords in the search box to search for KingbaseES.

  4. On the Create KingbaseES Data Source page, configure the connection parameters for the data source.

    1. Configure the basic information for the data source.

      Parameter

      Description

      Data Source Name

      The name must meet the following requirements:

      • It can contain only Chinese characters, letters, digits, underscores (_), and hyphens (-).

      • It can be up to 64 characters long.

      Datasource Code

      After you configure the data source code, you can reference tables in Flink_SQL nodes using the format datasource_code.table_name or datasource_code.schema.table_name. To automatically access the data source in the corresponding environment, use the variable format ${datasource_code}.table or ${datasource_code}.schema.table. For more information, see Dataphin data source table development methods and .

      Important
      • The 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 inventory only after the data source code is configured.

      • In Flink SQL, only MySQL, Hologres, MaxCompute, Oracle, StarRocks, Hive, and SelectDB data sources are supported.

      Version

      The supported versions are V8R3, V8R6, and V9R1.

      Data Source Description

      A description of the KingbaseES data source. The description can be up to 128 characters long.

      Data Source Configuration

      Based on whether your business data source uses separate production and development environments:

      • If your business data source uses separate environments, select Production + Development Data Source.

      • If your business data source does not use separate environments, select Production Data Source.

      Tags

      You can add tags to the data source for categorization. For more information about how to create tags, see Manage data source tags.

    2. Configure the connection parameters.

      If you set Data Source Configuration to Production + Development Data Source, you must configure connection information for both environments. If you set it to Production Data Source, you only need to configure connection information for the production data source.

      Note

      Typically, production and development data sources should be configured as separate data sources to isolate the environments and reduce the impact of development activities on production. However, Dataphin also supports configuring them as the same data source with identical parameter values.

      Set Configuration Method to JDBC URL or Host. The default is JDBC URL.

      JDBC URL configuration method

      Parameter

      Description

      JDBC URL

      The format of the connection URL is jdbc:kingbase8://host:port/dbname. Example: jdbc:kingbase8//192.168.*.212:54321/dataphin.

      Schema

      Schema is the name of the database in the KingbaseES instance. You can find the database name on the data management page of the KingbaseES instance.

      Username and Password

      The username and password for logging on to the database.

      Host configuration method
      • Host configuration method

        Parameter

        Description

        Server Address

        Enter the IP address and port number of the server.

        Click +Add to add multiple IP addresses and port numbers. Click the image icon to delete extra entries. You must keep at least one entry.

        dbname

        Enter the database name.

      • Parameter configuration

        Parameter

        Description

        Parameter

        • Parameter name: 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: This is required if a parameter name is selected. The value can contain only letters, digits, periods (.), underscores (_), and hyphens (-), and can be up to 256 characters long.

        Note

        Click +Add Parameter to add multiple parameters. Click the image icon to delete extra parameters. You can add a maximum of 30 parameters.

        Username, Password

        The username and password for logging on to the KingbaseES database.

      Note

      If you create a data source using the Host configuration method and later switch to the JDBC URL method, the system concatenates the server IP address and port number to populate the JDBC URL field.

    3. Configure the advanced settings.

      Parameter

      Description

      socketTimeout

      The socket timeout period for the database, in seconds. The default is 1800 seconds (30 minutes).

      Note
      • If you configure socketTimeout in the JDBC URL, the value from the JDBC URL is used.

      • For data sources created before Dataphin V3.11, the default socketTimeout is -1, which indicates no timeout.

      connectTimeout

      The connection timeout period for the database, in seconds. The default is 900 seconds (15 minutes).

      Note
      • If you configure connectTimeout in the JDBC URL, the value from the JDBC URL is used.

      • For data sources created before Dataphin V3.11, the default connectTimeout is -1, which indicates no timeout.

      Connection Retries

      If a database connection times out, the system automatically retries the connection up to the specified number of times. If the connection still fails after the maximum number of 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.

      • The number of connection retries applies by default to offline integration nodes and global quality checks. The Asset Quality module must be enabled for global quality checks. You can configure the number of retries for each offline integration node.

    Note

    Parameter precedence:

    • If a parameter is defined in the JDBC URL, Advanced Settings, and Host Configuration sections, the value from the JDBC URL is used.

    • If a parameter is defined in both the JDBC URL and Advanced Settings sections, the value from the JDBC URL is used.

    • If a parameter is defined in both the Advanced Settings and Host Configuration sections, the value from Advanced Settings is used.

  5. Select a Default Resource Group. This resource group is used to run tasks related to the data source, such as database SQL queries, offline full-database migrations, and data previews.

  6. Click Test Connection, or click OK to save the configuration and create the KingbaseES data source.

    When you click Test Connection, the system tests the connection to Dataphin. If you click OK, the system automatically tests the connection for all selected clusters. The data source is created even if the connection tests fail.