All Products
Search
Document Center

Dataphin:Create a Log Service data source

Last Updated:Jun 04, 2025

Creating a Log Service data source enables Dataphin to read business data from Log Service. In scenarios where you need to import business data from Log Service to Dataphin for data development, you must first create a Log Service data source. This topic describes how to create a Log Service data source.

Background information

Log Service is an Alibaba Cloud service that provides a large-scale, low-cost, and real-time platform for Log, Metric, and Trace data. If you use Alibaba Cloud Log Service and want to connect it to Dataphin for data development, you must first create a Log Service data source. For more information about Log Service, see What is Log Service.

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. On the Dataphin homepage, click Management Center > Datasource Management in the top navigation bar.

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

  3. On the Create Data Source page, select Log Service in the Message Queue section.

    If you have recently used Log Service, you can also select it from the Recently Used section. You can also quickly search for Log Service by entering keywords in the search box.

  4. On the Create Log Service 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 Flink_SQL tasks 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 successfully.

      • After the data source code is configured successfully, you can preview data on the object details page in the asset directory and asset inventory.

      • In Flink SQL, only MySQL, Hologres, MaxCompute, Oracle, StarRocks, Hive, and SelectDB 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 that you want 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 and tag data sources using 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 in the previous step, the configuration page for Production + Development Data Source is displayed. If you selected Production Data Source, only the configuration page for Production Data Source is displayed.

      Note

      In most cases, the production data source and development data source should be configured as different data sources to isolate the development environment from the production environment and reduce the impact of the development data source on the production data source. However, Dataphin also supports configuring them as the same data source with identical parameter values.

      Parameter

      Description

      LogHub Endpoint

      The endpoint of Log Service. We recommend that you configure an endpoint in an Alibaba Cloud VPC network. For information about how to obtain an endpoint, see Endpoint.

      Important

      You can configure only the Log Service endpoint that is in the same region as the Dataphin instance.

      Project

      The name of the Log Service project. You can view the project name on the Log Service console page.

      Access ID, Access Key

      The AccessKey ID and AccessKey Secret of the current account.

      For information about how to obtain them, see Create an AccessKey pair.

  5. Select a Default Resource Group that 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 Log Service data source.

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