You can configure data sources for DataService Studio to read table schemas and process API query requests.

Prerequisites

To ensure that resource groups for DataService Studio can access data sources, you must configure network connectivity between the resource groups and data sources and configure IP address whitelists of the data sources. Otherwise, DataService Studio cannot work as expected.

Procedure

  1. Log on to the DataWorks console.
  2. In the left-side navigation pane, click Workspaces.
  3. Select the region in which the workspace that you want to manage resides. Then, find the workspace and click Workspace Settings in the Actions column. In the panel that appears, click More.
  4. In the left-side navigation pane, click Data Source.
    You can configure a connection on this page. The following table describes the supported types of data sources and the configuration methods.
    Data source type Generate an API in the codeless UI Create an API in the code editor Configuration method
    Hologres Supported Supported Add a Hologres data source
    Note

    Hologres is compatible with PostgreSQL. PostgreSQL does not support the DATETIME data type. If your Hologres instance contains data of the DATETIME type, Hologres converts the data from the DATETIME type to the TIMESTAMP type so that DataService Studio can query the data.

    ClickHouse Supported Supported Add a ClickHouse data source
    RDS Supported Supported Supported RDS engine types are MySQL, PostgreSQL, and SQL Server.
    Distributed Relational Database Service (DRDS) Supported Supported Add a DRDS data source
    Note You can add this type of data source only by using a connection string.
    MySQL Supported Supported Add a MySQL data source
    PostgreSQL Supported Supported Add a PostgreSQL data source
    SQL Server Supported Supported Add an SQL Server data source
    Oracle Supported Supported Add an Oracle data source
    Note You can add this type of data source only by using a connection string.
    AnalyticDB for MySQL V2.0 Supported Supported Add an AnalyticDB for MySQL 2.0 data source
    AnalyticDB for MySQL 3.0 Supported Supported Add an AnalyticDB for MySQL 3.0 data source
    AnalyticDB for PostgreSQL Supported Supported Add an AnalyticDB for PostgreSQL data source
    Tablestore Supported Not supported Add a Tablestore data source
    Note You can add this type of data source only by using a connection string.
    MongoDB Supported Not supported Add a MongoDB data source
    MaxCompute DataWorks temporally disables the feature of adding MaxCompute data sources for feature updates. DataWorks temporally disables the feature of adding MaxCompute data sources for feature updates. Add a MaxCompute data source
    Note

    DataService Studio APIs use the MaxCompute Query Acceleration (MCQA) feature to query data from MaxCompute data sources. For more information about the scenarios and limits of this feature, see MaxCompute Query Acceleration. If the prerequisites of using the MCQA feature are not met, the calls of the DataService Studio APIs fail.

  5. In the dialog box for adding the data source, set the Resource Group connectivity parameter to Data Service and use a resource group for DataService Studio to test network connectivity. In the example shown in the following figure, a MySQL data source is added.
    Test network connectivity
    Note If the network connectivity test fails, check your configurations. For more information, see Configure network connectivity and whitelists.
  6. After the data source passes the network connectivity test, return to DataService Studio to create an API for the data source.