Create a single-physical-table service unit

更新时间: 2026-06-02 20:24:17

A single-physical-table service unit configures metadata for one physical table in a business data source, enabling you to develop APIs that access data in that table.

Prerequisites

Limitations

Permissions

Both project administrators and developers can create service units.

Step 1: Select the service unit type

  1. On the Dataphin homepage, choose Service > API Development from the top navigation bar.

  2. Select a project in the upper-left corner, then click Service Unit in the left navigation pane. On the Service Unit page, click + Create Service Unit.

  3. In the Create Service Unit dialog box, select Single-Physical-Table Service Unit.

Step 2: Configure the service unit parameters

  1. On the Create Service Unit page, configure the basic information and fields.

    1. Configure basic information

      Parameter

      Description

      Service unit name

      The service unit name. Must meet the following requirements:

      • Can contain only letters, digits, and underscores (_).

      • Must start with a letter.

      • Must be 4 to 64 characters in length.

      Service unit group

      Select an existing service unit group.

      mode

      Defines whether the service unit reads from a development or production data source. Available modes: Basic and Dev-Prod:

      • Basic: Reads only from a production data source.

      • Dev-Prod: Reads from both development and production data sources.

      Check the data source type on the data source page.

      Physical table

      Filter physical tables by data source type and data source. Click Add Data Source to add a new business data source. Supported data sources: Data sources supported by Data Service.

      Service unit description

      A brief description of the service unit. Maximum: 128 characters.

      Maximum rows returned

      Default: 1,000 rows. Maximum: 10,000.

      Limits API query results to prevent excessive memory usage. To retrieve more data, adjust the PageSize parameter in the SDK when you call an API.

      If a service unit with similar basic information exists, Dataphin displays its name. You can view its details in the service unit list. Click Continue to Create to proceed to the Configure Service Unit Fields page.

    2. Configure service unit fields.

      Parameter

      Description

      Service unit field type

      Supported types: Double, Float, String, Date, Boolean, Int, Long, Short, Byte, BigDecimal, and Binary. Select the type that matches the field type in your business data table.

      If the field type is not listed, we recommend using String.

      Service unit field

      • Select fields from the source table to use as service unit fields. New fields added to the source table become available when you edit the service unit.

      • Map data source fields to service unit field names. Custom names must meet the following requirements:

        • Can contain only letters, digits, and underscores (_).

        • Must start with a letter.

        • Must be 4 to 64 characters in length.

      • When editing, remove fields deleted from the source table to prevent API failures from missing fields.

      Service unit field description

      Enter a brief description for the service unit field.

      After configuring fields, click Data Preview to preview business data. Up to 1,000 rows are returned.

    3. The system automatically parses row-level permissions associated with the selected physical table, including the permission name, description, control field, data source environment, associated table, and associated field. You can also:

      • Enable or disable row-level permission: Controls the permission's active state and its visibility in the service unit details.

      • Create Row-Level Permission: Requires row-level permission creation privileges. Redirects to Management Center > Permission Management, where you can create a row-level permission.

        Note
        • The row-level permission feature requires a paid add-on service.

        • API call results may differ depending on the permissions applied.

        • When the mode is Basic, row-level permissions for physical tables in the production environment are displayed. When the mode is Dev-Prod, permissions for tables in both the development and production environments are displayed.

        • If row-level permission is enabled for a published service unit, any API created from that unit is subject to the corresponding permission controls.

        • If you create or delete a row-level permission associated with a published service unit in Management Center > Permission Management, the change takes effect automatically for all APIs based on that unit. You do not need to republish the APIs.

        • The selected physical table is subject to its associated row-level permission controls, regardless of whether its fields are used by an API or added to the service unit.

  2. Click Submit to create the single-physical-table service unit.

What to do next

  • On the Service Unit page, find your service unit, click the image.png icon in the Actions column, and select Publish. This publishes the service unit to production. You can then create APIs based on this service unit. Create an API.

  • After creation, you can edit, publish, and delete service units on the Service Unit page. Manage service units.

上一篇: Create a service unit 下一篇: Create a multi-physical-table service unit
阿里云首页 智能数据建设与治理 Dataphin 相关技术圈