All Products
Search
Document Center

Dataphin:Create an OceanBase data source

Last Updated:Jun 23, 2026

Create an OceanBase data source to enable Dataphin to read business data from or write data to OceanBase.

Background information

OceanBase is a financial-grade distributed relational database independently developed by Alibaba Group and Ant Financial. To connect ApsaraDB for OceanBase to Dataphin for data development or to write Dataphin data to OceanBase, create an OceanBase data source. For more information about OceanBase, see What is OceanBase Database.

Permission requirements

Only users with the Create Data Source permission in a custom global role, or with the super administrator, data source administrator, domain architect, or project administrator system role 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, click Relational Database and select OceanBase.

    If you have recently used OceanBase, you can also find it in the Recently Used section or use the search box.

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

    1. 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 task by using the data source code.table name or data source code.schema.table name format. 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}.table or ${data source code}.schema.table. For more information, see Dataphin data source table development method.

      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 data source, such as its business purpose or origin. Maximum length: 128 characters.

      Real-time Development

      Enable this option to make the data source available for real-time development. Additional parameters are required.

      Data Source Configuration

      Select the data source that you want to configure:

      • If the business data source is divided into production and development data sources, select Production + Development Data Source.

      • If the business data source is not divided into production and development data sources, select Production Data Source.

      Tag

      You can categorize and tag data sources based on 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 connection information for both environments. If you selected Production data source, configure connection information for the production environment only.

      Note

      We recommend that you configure separate production and development data sources to isolate environments. However, Dataphin also supports using the same data source with identical parameter values for both.

      Parameter

      Description

      Tenant Mode

      The tenant mode. MySQL Tenant and Oracle Tenant are supported. MySQL Tenant supports both MySQL and OceanBase protocols. Oracle Tenant supports only the OceanBase protocol.

      JDBC URL

      The connection address of OceanBase. The format is as follows:

      MySQL Tenant: jdbc:mysql://host:port/dbname

      Oracle Tenant: jdbc:oceanbase://host:port/dbname

      Username, Password

      The username and password of the target database.

    3. Configure advanced settings for the data source.

      Parameter

      Description

      connectTimeout

      The connection timeout of the database, in milliseconds. Default value: 900,000 (15 minutes).

      Note
      • If you have configured connectTimeout in the JDBC URL, the connectTimeout is the timeout period configured in the JDBC URL.

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

      socketTimeout

      The socket timeout of the database, in milliseconds. Default value: 1,800,000 (30 minutes).

      Note
      • If you have configured socketTimeout in the JDBC URL, the socketTimeout is the timeout period configured in the JDBC URL.

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

      Connection Retries

      The number of automatic retry attempts when a database connection times out. The connection fails if all retries are exhausted.

      Note
      • The default number of retries is 1. You can set a value between 0 and 10.

      • The number of connection retries is applied to offline integration tasks and global quality (the asset quality feature module must be activated). You can configure the number of retries separately for offline integration tasks.

  5. Select Default Resource Group. This resource group is used to run tasks related to the current data source, including database SQL, offline database migration, and data preview.

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

    Clicking Test Connection verifies connectivity between the data source and Dataphin. If you click OK directly, the system tests connectivity for all selected clusters automatically. The data source is created even if all cluster connection tests fail.

    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.