All Products
Search
Document Center

Dataphin:Create an OpenSearch data source

Last Updated:Nov 19, 2025

You can create an OpenSearch data source to write data from Dataphin to OpenSearch. This topic describes how to create an OpenSearch data source.

Permissions

Only users with the following roles can create data sources: super administrator, data source administrator, board architect, project administrator, and custom global roles that have the Create Data Source permission.

Procedure

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

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

  3. On the New Data Source page, in the NoSQL section, select OpenSearch.

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

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

    1. Configure the basic information for the data source.

      Parameter

      Description

      Datasource Name

      Enter a name for the data source. The name must follow these conventions:

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

      • Must be no more than 64 characters long.

      Datasource Code

      After you configure the data source code, you can directly access Dataphin data source tables from Flink_SQL nodes or a Dataphin Java Database Connectivity (JDBC) client. Use the format DataSourceCode.TableName or DataSourceCode.schema.TableName for quick access. To automatically switch data sources based on the task execution environment, use the variable format ${DataSourceCode}.table or ${DataSourceCode}.schema.table. For more information, see Develop a Dataphin data source table.

      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

      Only version 2.x is supported.

      Datasource Description

      Enter a brief description of the data source. The description can be up to 128 characters long.

      Datasource Config

      Select the data source to configure:

      • If your business data source has separate production and development environments, select Production + Development Data Source.

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

      Tag

      Add tags to classify the data source. To create tags, see Manage data source tags.

    2. Configure the connection parameters for Dataphin.

      If you selected Production + Development Data Source in the previous step, the configuration page for both production and development data sources is displayed. If you selected Production Data Source, only the configuration page for the production data source is displayed.

      Note

      Typically, you should configure the production and development data sources as different data sources to isolate the development environment from the production environment. This practice reduces the impact of development activities on the production data source. However, Dataphin also lets you configure them as the same data source using the same parameter values.

      Parameter

      Description

      Endpoint

      Enter the OpenSearch endpoint. For example, http://opensearch-host:9200.

      Username, Password

      If authentication is enabled for the OpenSearch instance, enter the username and password to access the instance.

  5. Select the Default Resource Group. This resource group runs tasks related to the data source, such as database SQL tasks, offline full database migration, and data previews.

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

    When you click Test Connection, the system tests the connectivity between Dataphin and the data source. If you click OK directly, the system automatically tests the connection for all selected clusters. The data source is created even if the 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 only used to test network connectivity with the current data source and are not used for running related tasks later.

    • The test connection usually takes less than 2 minutes. If it times out, you can click the image icon to view the specific reason and retry.

    • Regardless of whether the test result is Connection Failed, Connection Successful, or Succeeded With Warning, the system will record the generation time 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, you can click the image icon to view the specific failure reason.

    • When the test result is Succeeded With Warning, it means that the application cluster connection is successful but the scheduling cluster connection failed. The current data source cannot be used for data development and integration. You can click the image icon to view the log information.