All Products
Search
Document Center

DataWorks:Acceleration solutions for API-based data queries

Last Updated:Jan 19, 2024

DataService Studio allows you to configure an acceleration solution to accelerate queries of specific raw data tables. The acceleration solutions include Acceleration Service provided by DataService Studio and MCQA provided by MaxCompute. You can configure an acceleration solution for an API to improve the query performance and efficiency of the API. This topic describes the supported acceleration solutions and how to configure an acceleration solution for an API.

Background information

DataService Studio provides the following acceleration solutions: Acceleration Service and MCQA. You can join the DataWorks DingTalk group for consultation.

The following table describes the two acceleration solutions.

Acceleration solution

Description

Supported region and resource group

Configuration

Acceleration Service

This acceleration solution is implemented based on Hologres external tables. This solution allows Hologres to establish mappings between the schema of a Hologres external table and that of a MaxCompute table. You do not need to export data from MaxCompute. This accelerates the query of MaxCompute data.

Note

When you use this solution, you do not need to purchase a Hologres compute engine instance because an existing Hologres compute engine instance is automatically used. You need to only specify the MaxCompute table for which you want to enable acceleration.

  • This acceleration solution is supported in the China (Shanghai), China (Beijing), China (Hangzhou), and China (Shenzhen) regions.

  • From March 1, 2023, you are charged for using this acceleration solution when you use the shared resource group for DataService Studio to call DataService Studio APIs. For information about the billing of the shared resource group for DataService Studio, see DataService Studio.

  • You can use this solution to perform accelerated queries only on MaxCompute data.

Before you use the acceleration solution, you must perform the following operations:

  1. Add acceleration items

  2. Configure an API

For more information, see Use the Acceleration Service solution.

MCQA

This acceleration solution is implemented based on the MaxCompute Query Acceleration (MCQA) feature. You can use this solution to accelerate the execution of small- and medium-sized query jobs, and reduce the execution time from minutes to seconds. For more information, see MCQA overview.

  • This acceleration solution is supported in the China (Beijing), China (Hangzhou), China (Shanghai), and China (Shenzhen) regions. The update to the solution is complete.

  • Only exclusive resource groups for DataService Studio support this acceleration solution.

  • This acceleration solution is available for subscription MaxCompute projects and pay-as-you go MaxCompute projects.

To use the acceleration solution, you need to only select MCQA for the Acceleration Method parameter when you configure an API. For more information, see Use the MCQA solution.

Use the Acceleration Service solution

Precautions

  • An acceleration item can contain only one data table, and only one acceleration item can be added for a data table.

  • When you add an acceleration item, if you select the name of a data table for which an acceleration item has been added, the acceleration item fails to be initialized.

Step 1: Add an acceleration item

  1. Go to the DataService Studio page.

    Log on to the DataWorks console. In the left-side navigation pane, click DataService Studio. On the page that appears, select the desired workspace from the drop-down list and click Go to DataService Studio.

  2. In the left-side navigation pane, click the 数据加速 icon to go to the Acceleration Service page.

  3. In the upper-right corner of the Acceleration Service page, click Add Acceleration Item.

  4. In the Add Acceleration Item dialog box, configure the parameters. The following table describes the parameters.

    新增

    Parameter

    Description

    Acceleration Solution

    Select Hologres Foreign Table.

    Note

    Hologres is a real-time data warehousing service developed by Alibaba Cloud and is connected to MaxCompute at the underlying layer. The Acceleration Service solution is implemented based on Hologres external tables. This solution allows Hologres to establish mappings between the schema of a Hologres external table and that of a MaxCompute table. You do not need to export data from MaxCompute. This accelerates the query of MaxCompute data. When you use this solution, you do not need to purchase a Hologres compute engine instance because an existing Hologres compute engine instance is automatically used. You need to only specify the MaxCompute table for which you want to enable acceleration.

    Datasource Type

    Select MaxCompute (ODPS).

    Table Name

    Select the names of the MaxCompute data source and data table.

    Note

    If you want to accelerate queries of multiple data tables, click Add Table to add the data tables. This way, multiple acceleration items can be added at a time. You can add a maximum of 10 MaxCompute data tables at a time.

  5. Click OK. After Initialize Succeeded appears in the Status column of the Add Acceleration Item dialog box, click Close.

Step 2: Configure an API

Find the desired API and double-click the name of the API. In the Select Table section of the configuration tab of the API, configure the Datasource Type, Datasource Name, Acceleration Method, and Table Name parameters.选择表

  • Datasource Type: Select MaxCompute (ODPS).

  • Datasource Name: Select the name of the data source for which an acceleration item is added.

  • Acceleration Method: Select Acceleration Service.

    Note
    • After you set the Acceleration Method parameter to Acceleration Service, the Acceleration Service solution is used to accelerate data queries that are performed by using the API. On the Acceleration Service page, you can view the acceleration items that are associated with the API.

    • If an API is created by using the code editor, you can use this API to perform only single-table queries and must use the Hologres syntax in the code editor.

  • Table Name: The data tables for which an acceleration item is added are marked with Accelerated. You can select a data table for which an acceleration item is added from the drop-down list.

For more information about how to configure other parameters, see Create an API by using the codeless UI or Create an API by using the code editor.

Step 3: View acceleration items

On the Acceleration Service page of DataService Studio, you can view the accelerated items that you added.数据加速

Column name

Description

Actions

Supported operations: Discard and View API.

  • Discard: You can click Discard to discard an acceleration item. After you discard the acceleration item, an error occurs when you call an API that is associated with the acceleration item.

    Note

    Before you discard an acceleration item, we recommend that you check the APIs that are associated with the acceleration item and unpublish the APIs.

  • View API: You can click the More icon and select View API to view the APIs that are associated with the related acceleration item.

Use the MCQA solution

To use the MCQA acceleration solution, you need to only configure an API.

Configure an API

Find the desired API and double-click the name of the API. In the Select Table section of the configuration tab of the API, configure the Datasource Type, Datasource Name, Acceleration Method, and Table Name parameters.MCQA

  • Datasource Type: Select MaxCompute (ODPS).

  • Datasource Name: Select the name of the data source for which an acceleration item is added.

  • Acceleration Method: Select MCQA.

    Note

    After you set the Acceleration Method parameter to MCQA, the MCQA solution is used to accelerate data queries that are performed by using the API.

  • Table Name: Select the name of the desired MaxCompute data table.

For more information about how to configure other parameters, see Create an API by using the codeless UI or Create an API by using the code editor.