All Products
Search
Document Center

Dataphin:t2325969

Last Updated:Jun 23, 2026

Create a StarRocks data source to enable Dataphin to read business data from or write data to StarRocks.

Background information

StarRocks is a high-performance analytical database that supports real-time, multi-dimensional, and highly concurrent data analysis. It is highly scalable, available, and easy to maintain, and covers OLAP scenarios such as real-time analysis, ad hoc queries, and data lake analysis. For more information, see StarRocks official website.

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

  1. In the top navigation bar of the Dataphin homepage, choose Management Center > Datasource Management.

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

  3. On the Create Data Source page, in the Relational Database section, select StarRocks.

    If you recently used StarRocks, you can also find it in the Recently Used section. You can also enter StarRocks in the search box to filter results.

  4. On the Create StarRocks Data Source page, configure the connection parameters.

    1. Configure the basic information of the data source

      Parameter

      Description

      Data Source Name

      The name must meet the following requirements:

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

      • It cannot exceed 64 characters in length.

      Data Source Code

      Once configured, you can reference tables in the data source in Flink SQL nodes using the data_source_code.table or data_source_code.schema.table format. To automatically access the data source of the corresponding environment, use the ${data_source_code}.table or ${data_source_code}.schema.table format.

      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 brief description of the data source. It cannot exceed 128 characters.

      Data Source Configuration

      Select the data source to configure:

      • If the business data source distinguishes between production and development data sources, select Production + Development Data Source.

      • If the business data source does not distinguish between production and development data sources, select Production Data Source

      Tag

      You can categorize data sources by adding tags. For information about how to create tags, see Manage data source tags.

    2. Configure the connection parameters between the data source and Dataphin

      If you selected Production + Development data source, configure the connection information for both environments. If you selected Production data source, configure only the production connection information.

      Note

      We recommend configuring production and development data sources separately to isolate environments and reduce the impact of development on production. However, you can also configure them as the same data source with identical parameter values.

      Parameter

      Description

      JDBC URL

      The JDBC URL for StarRocks. The following formats are supported:

      • jdbc:mysql:loadbalance://{fe1-host}:{port},{fe2-host}:{port},{fe3-host}:{port}/{database}

      • jdbc:mysql://host:port/dbname

      Load URL

      The host and HTTP port of the frontend (FE). Use the format fe_host:http_port,fe_host:http_port.

      Username, Password

      The username and password for logging in to the database.

    3. Configure advanced settings for the data source.

      Parameter

      Description

      connectTimeout

      The connection timeout for the database, in milliseconds. Default: 900000 (15 minutes).

      Note
      • If connectTimeout is specified in the JDBC URL, the JDBC URL value takes precedence.

      • For data sources created in Dataphin versions earlier than V3.11, the default value is -1, which means no timeout limit.

      socketTimeout

      The socket timeout for the database, in milliseconds. Default: 1800000 (30 minutes).

      Note
      • If socketTimeout is specified in the JDBC URL, the JDBC URL value takes precedence.

      • For data sources created in Dataphin versions earlier than V3.11, the default value 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 all retries fail, the connection is considered failed.

      Note
      • The default number of retries is 1, and you can configure a value between 0 and 10.

      • The retry count applies by default to offline integration tasks and global quality (requires the Asset Quality feature module). You can also configure task-level retry counts in offline integration tasks.

  5. Select a Default Resource Group, which will be used to run tasks related to the current data source, including database SQL, offline database migration, data preview, and more.

  6. Click Test Connection or directly click OK to save and complete the creation of the StarRocks data source.

    When you click Test Connection, the system tests whether the data source can connect to Dataphin. If you click OK directly, the system automatically tests the connection for all selected clusters, but the data source is still created even if all clusters fail to connect.

    Test Connection tests the connection for the Default Cluster or Registered Scheduling Clusters that have been registered in Dataphin and are in normal use. The Default Cluster is selected by default and cannot be deselected. If there are no resource groups under a Registered Scheduling Cluster, connection testing is not supported. You need to create a resource group first before testing the connection.

    • The selected clusters are used only to test network connectivity and are not used for running tasks.

    • The test connection usually completes within 2 minutes. If it times out, click the image icon to view the reason and retry.

    • Regardless of the test result (Connection Failed, Connection Successful, or Succeeded With Warning), the system records the timestamp of the final result.

      Note

      Only the test results for the Default Cluster include three connection statuses: Succeeded With Warning, Connection Successful, and Connection Failed. The test results for Registered Scheduling Clusters in Dataphin only include two connection statuses: Connection Successful and Connection Failed.

    • When the test result is Connection Failed, click the image icon to view the failure reason.

    • When the test result is Succeeded With Warning, the application cluster connection succeeded but the scheduling cluster connection failed. The data source cannot be used for data development and integration. Click the image icon to view the log information.