All Products
Search
Document Center

Dataphin:Create a GBase 8c data source

Last Updated:Jan 13, 2026

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

Limits

Only users with a custom global role that includes the Create Data Source permission or users with the super administrator, data source administrator, workspace architect, or project administrator system role can create data sources.

Procedure

  1. On the Dataphin home page, go to the top menu bar and choose Management Center > Datasource Management.

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

  3. On the New Data Source page, in the Relational Database section, select GBase 8c.

    If you have recently used GBase 8c, you can also select GBase 8c from the Recently Used section. Alternatively, you can enter GBase 8c in the search box to find it quickly.

  4. On the New GBase 8c Data Source page, configure the connection parameters for the data source.

    1. Configure the basic information for the data source.

      Parameter

      Description

      Datasource Name

      The naming convention is as follows:

      • Can contain only Chinese characters, uppercase and lowercase letters, digits, underscores (_), and hyphens (-).

      • 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 using the DataSourceCode.TableName or DataSourceCode.schema.TableName format. To automatically access the data source for the current environment, use the variable format ${DataSourceCode}.table or ${DataSourceCode}.schema.table. For more information, see Develop tables for Dataphin data sources.

      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 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

      A description of the GBase 8c data source. It cannot exceed 128 characters.

      Data Source Configuration

      Specifies whether to use separate data sources for the production and development environments:

      • If you use separate data sources, select Production + Development Data Source.

      • If you do not use separate data sources, select Production Data Source.

      Tag

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

    2. 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 environments. If you set it to Production Data Source, you only need to configure the connection information for the production data source.

      Note

      Typically, the production and development data sources should be different to ensure environment isolation and reduce the impact of the development environment on the production environment. However, Dataphin also lets you use the same data source for both environments using the same parameter values.

      For Configuration Method, you can select JDBC URL or Host. JDBC URL is selected by default.

      JDBC URL configuration method

      Parameter

      Description

      JDBC URL

      The endpoint format is jdbc:gbase8c://host:port/database.

      Schema

      Enter the schema associated with the username.

      Username and Password

      Enter the username and password for authentication. To ensure that tasks run correctly, make sure the user has the required data permissions.

      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 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 settings

        Parameter

        Description

        Parameter

        • Parameter name: You can select an existing parameter name or enter a custom one.

          Custom parameter names can contain only uppercase and lowercase letters, digits, periods (.), underscores (_), and hyphens (-).

        • Parameter value: This is required if you select a parameter name. It can contain only uppercase and lowercase letters, digits, periods (.), underscores (_), and hyphens (-). The value cannot exceed 256 characters in length.

        Note

        You can click + Add Parameter to add multiple parameters. Click the image icon to delete extra parameters. You can add up to 30 parameters.

        Schema

        Enter the schema associated with the username.

        Username, Password

        The username and password to log on to the GBase 8c database.

      Note

      If you select the Host configuration method and later switch to the JDBC URL method after the data source is created, the system automatically combines the server IP address and port number to populate the JDBC URL.

    3. Configure the advanced settings for the data source.

      Parameter

      Description

      socketTimeout

      The socket timeout duration for the database, in milliseconds. The default value is 1,800,000 ms (30 minutes).

      Note
      • If the JDBC URL contains a socketTimeout setting, that value is used.

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

      connectTimeout

      The connection timeout duration for the database, in milliseconds. The default value is 900,000 ms (15 minutes).

      Note
      • If the JDBC URL contains a connectTimeout setting, that value is used.

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

      Connection Retries

      If the 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 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 batch integration tasks and global quality rules (requires the asset quality feature). You can configure the number of retries at the task level for batch integration tasks.

    Note

    Duplicate parameter value precedence:

    • If a parameter is set in the JDBC URL, Advanced Settings, and Host configuration, the value in the JDBC URL takes precedence.

    • If a parameter is set in both the JDBC URL and Advanced Settings, the value in the JDBC URL takes precedence.

    • If a parameter is set in both Advanced Settings and the Host configuration, the value in Advanced Settings takes precedence.

  5. Select a Default Resource Group. This resource group is used to run tasks related to the data source, such as running database SQL statements, performing batch full-database migrations, and previewing data.

  6. Click Test Connection or click OK to save the settings and create the GBase 8c data source.

    When you click Test Connection, the system tests the connection to Dataphin. If you click OK directly, the system automatically tests the connections for all selected clusters. You can create the data source even if the connection tests fail.