Create a YashanDB data source

Updated at:

Create a YashanDB data source to enable Dataphin to read from or write to a YashanDB database.

Background

YashanDB is a proprietary relational database. Its kernel is not based on any open-source database and is compatible with the Oracle syntax system. To use Dataphin for data development with a YashanDB database, you must first create a YashanDB data source.

A YashanDB data source is primarily for offline integration. After you create the data source, you can use the Yashan input component in an offline pipeline to read data from YashanDB, or use the Yashan output component to write data to the database.

Permissions

Only users who have the New Data Source permission or are assigned the Super Administrator, Data Source Administrator, Module Architect, or Project Administrator role can create data sources.

Procedure

  1. In the Dataphin console, choose Management Center > Data Source Management from the top navigation bar.

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

  3. On the New Data Source page, in the Relational Database section, select YashanDB (Yashan).

    If you have used YashanDB recently, you can select YashanDB from the Recently Used section. Alternatively, enter keywords such as Yashan or YashanDB in the search box to quickly find the data source.

  4. On the New YashanDB Data Source page, configure the connection parameters for the data source.

    1. Configure basic information

      Parameter

      Description

      Data source name

      Enter a name for the data source. The name must meet the following requirements:

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

      • Cannot exceed 64 characters in length.

      Data source code

      The data source code is prefixed with ds_. This prefix cannot be changed. To automatically access the data source that corresponds to an environment, use the variable format ${data source code}.table or ${data source code}.schema.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 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.

      Version

      Currently, only version 23.4 is supported.

      Data source description

      Enter a brief description for the data source, up to 128 characters.

      Time zone

      Dataphin processes time-formatted data in integration tasks based on the selected time zone. The default time zone is Asia/Shanghai. Click Modify to select a target time zone. The available options are:

      • GMT: GMT-12:00, GMT-11:00, GMT-10:00, GMT-09:30, GMT-09:00, GMT-08:00, GMT-07:00, GMT-06:00, GMT-05:00, GMT-04:00, GMT-03:00, GMT-02:30, GMT-02:00, GMT-01:00, GMT+00:00, GMT+01:00, GMT+02:00, GMT+03:00, GMT+03:30, GMT+04:00, GMT+04:30, GMT+05:00, GMT+05:30, GMT+05:45, GMT+06:00, GMT+06:30, GMT+07:00, GMT+08:00, GMT+08:45, GMT+09:00, GMT+09:30, GMT+10:00, GMT+10:30, GMT+11:00, GMT+12:00, GMT+12:45, GMT+13:00, GMT+14:00.

      • Daylight Saving Time: Africa/Cairo, America/Chicago, America/Denver, America/Los_Angeles, America/New_York, America/Sao_Paulo, Asia/Bangkok, Asia/Dubai, Asia/Kolkata, Asia/Shanghai, Asia/Tokyo, Atlantic/Azores, Australia/Sydney, Europe/Berlin, Europe/London, Europe/Moscow, Europe/Paris, Pacific/Auckland, Pacific/Honolulu.

      Data source configuration

      Select an option based on your environment setup:

      • If your environments are separate, select Production + Dev Data Source.

      • If your environments are not separate, select Production Data Source.

      Tags

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

    2. Configure connection parameters

      If you selected Production + Dev Data Source, you must configure connection information for both environments. If you selected Production Data Source, configure only the production data source.

      Note

      Typically, the production and development data sources should be configured as separate sources to ensure environment isolation. This practice reduces the risk of development activities affecting the production environment. However, if your development and production environments share the same data source, you can configure them with the same parameter values. In this case, development operations may directly impact production data. This configuration is suitable only if you have confirmed that environment isolation is not required.

      You can set the Configuration Method to JDBC URL or host. The default is JDBC URL.

      JDBC URL

      Parameter

      Description

      JDBC URL

      The format of the connection URL is jdbc:yasdb://host:port/database_name, where host is the IP address of the YashanDB server, port is the port number of the YashanDB service, and database_name is the database name.

      schema (Optional)

      Enter the schema associated with the username. If you leave this field blank, Dataphin uses a schema with the same name as the logged-in user by default.

      Note

      In YashanDB, unquoted object names are parsed as uppercase.

      username, password

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

      Host

      Parameter

      Description

      server address

      Enter the server's IP address and port number.

      Click + Add to add multiple IP address and port number pairs. Click the image icon to delete unnecessary pairs. You must keep at least one pair.

      dbname

      Enter the database name.

      schema (Optional)

      Enter the schema associated with the username. If you leave this field blank, Dataphin uses a schema with the same name as the logged-in user by default.

      username, password

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

      Note

      If you select the host configuration method and then switch to the JDBC URL configuration method after creating the data source, the system automatically concatenates the server IP address and port number to populate the JDBC URL field.

    3. Advanced settings

      Parameter

      Description

      connectTimeout

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

      Note

      If you configure connectTimeout in the JDBC URL, the value in the URL takes precedence.

      socketTimeout

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

      Note

      If you configure socketTimeout in the JDBC URL, the value in the URL takes precedence.

      connection retry attempts

      If a database connection times out, the system automatically retries the connection up to the specified number of attempts. If the connection still fails after the maximum number of retries, the connection attempt fails.

      Note
      • The default number of retry attempts for a failed connection is 1. You can set this value from 0 to 10.

      • The connection retry setting applies by default to offline integration tasks and Global Quality. The Global Quality feature requires activation. You can configure task-level retries separately within an offline integration task.

    Note

    If a parameter is configured in both the JDBC URL and advanced settings, the value in the JDBC URL takes precedence.

  5. Select a default resource group. This resource group runs tasks related to the data source, such as offline integration tasks.

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

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

    Test Connection tests the connection for the Public Scheduling Cluster or Registered Scheduling Clusters that have been registered in Dataphin and are in normal use. The Public Scheduling 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 Public Scheduling 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.

    Note

    If the connection test fails, see Network Connectivity Solutions to troubleshoot the issue.