All Products
Search
Document Center

DataWorks:Add a data source

Last Updated:Mar 27, 2026

Add your database or data warehouse to DataWorks as a data source before using DataService Studio to create an API. DataService Studio reads the data source's table schema to help you configure the request and response parameters of the API.

Prerequisites

Before you begin, ensure that you have:

  • Configured network connectivity and whitelists between your data sources and service resource groups. Without this, DataService Studio tasks cannot run as expected. For details, see Network connectivity solutions

Add a data source

  1. Go to the Data Sources page.

    1. Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose More > Management Center.

    2. On the page that appears, select the desired workspace from the drop-down list and click Go to Management Center.

    3. In the left-side navigation pane of the SettingCenter page, click Data Sources.

  2. On the Data Source page, add a data source based on your database type. The following tables list supported data source types, grouped by category, along with configuration methods and usage notes.

    Relational databases

    Data source Codeless UI Code Editor Configuration method Notes
    MySQL Supported Supported MySQL data source
    PostgreSQL Supported Supported PostgreSQL data source
    SQL Server Supported Supported SQL Server data source
    Oracle Supported Supported Oracle data source Must be configured in connection string mode.
    RDS Supported Supported MySQL data source / PostgreSQL data source / SQL Server data source Covers RDS for MySQL, RDS for PostgreSQL, and RDS for SQL Server. Set Configuration Mode to Alibaba Cloud Instance Mode when configuring these data sources.
    PolarDB-X (formerly DRDS) Supported Supported DRDS (PolarDB-X 1.0) data source Must be configured in connection string mode.
    PolarDB Supported Supported PolarDB data source Supports only serverless resource groups (recommended) and exclusive resource groups for DataService Studio. Available only in the China (Beijing), China (Hangzhou), China (Shanghai), and China (Shenzhen) regions.
    ApsaraDB for OceanBase Supported Supported ApsaraDB for OceanBase data source
    Db2 Supported Supported Db2 data source
    DM Supported Supported DM data source

    Analytical and columnar databases

    Data source Codeless UI Code Editor Configuration method Notes
    Hologres Supported Supported Attach a Hologres computing resource Hologres is compatible with PostgreSQL. PostgreSQL does not support the DATETIME data type, so Hologres converts DATETIME values to TIMESTAMP before DataService Studio queries them.
    AnalyticDB for MySQL 2.0 Supported Supported AnalyticDB for MySQL 2.0 data source
    AnalyticDB for MySQL 3.0 Supported Supported Attach an AnalyticDB for MySQL 3.0 computing resource
    AnalyticDB for PostgreSQL Supported Supported Attach an AnalyticDB for PostgreSQL computing resource
    ClickHouse Supported Supported Attach a ClickHouse computing resource Supports only serverless resource groups (recommended) or exclusive resource groups for DataService Studio.
    StarRocks Supported Supported StarRocks data source
    Doris Supported Supported Doris data source
    SAP HANA Supported Supported SAP HANA data source

    Big data and cloud-native warehouses

    Data source Codeless UI Code Editor Configuration method Notes
    MaxCompute Acceleration solution 1: Acceleration service; Acceleration solution 2: MaxCompute Query Acceleration (MCQA) Acceleration solution 1: Acceleration service; Acceleration solution 2: MCQA Data source setup: Attach a MaxCompute computing resource. Acceleration: Acceleration solutions for API-based data queries. Two acceleration solutions are available. Solution 1 (Acceleration service): single-table queries only; supports serverless resource groups (recommended), exclusive resource groups for DataService Studio, or the shared resource group for DataService Studio. Solution 2 (MCQA): supports both single-table and multi-table JOIN queries; requires a serverless resource group (recommended) or an exclusive resource group for DataService Studio. Both solutions are available only in the China (Beijing), China (Hangzhou), China (Shanghai), and China (Shenzhen) regions.

    NoSQL and other databases

    Data source Codeless UI Code Editor Configuration method Notes
    MongoDB Supported Not supported MongoDB data source
    Tablestore Supported Supported Tablestore Stream data source Must be configured in connection string mode. Supports only serverless resource groups (recommended) and exclusive resource groups for DataService Studio. Available only in the China (Shanghai) and China (Hong Kong) regions.
    Amazon Redshift Supported Supported Amazon Redshift data source
  3. On the data source configuration page, test the connectivity of the resource group.

    Important

    If the network connectivity test fails, check your configurations. For details, see Configure network connectivity.

  4. After the connectivity test passes, return to DataService Studio to create an API.