This topic answers frequently asked questions (FAQs) about Data Service.
-
Why can't DataService Studio connect to a self-managed database on ECS?
-
Does DataService Studio support MaxCompute (ODPS) data sources?
-
What are the differences between the wizard mode and the script mode for creating APIs?
-
When do I need to enable the pagination feature for API responses?
-
Does DataService Studio support POST requests for generated APIs?
-
Does DataService Studio support the HTTPS protocol for generated APIs?
Why can't Data Service connect to my self-managed database on an ECS instance?
Data Service does not support connecting to a self-managed database on an ECS instance. If you configure a private IP address, a network connectivity failure will occur.
Is it mandatory to activate API Gateway?
API Gateway provides API hosting services. If you plan to expose your APIs publicly, you must first activate API Gateway.
How do I configure a data source?
You can configure data sources on the page. After you configure a data source, Data Service automatically retrieves its details. For more information, see Add a data source.
Does Data Service support MaxCompute (ODPS) data sources?
Data Service does not support direct connections to MaxCompute (ODPS) data sources. You must use a Hologres data source to indirectly connect to and accelerate queries on MaxCompute data sources. For more information about Hologres data sources, see Add a Hologres data source.
Hologres provides a more efficient and stable real-time data warehouse service. If you previously used a Lightning data source to connect to MaxCompute data sources in an earlier version, we recommend that you migrate to Hologres.
Key concept
Script mode provides more powerful capabilities. For more information, see Create an API in script mode.
Key concept
An API group is a collection of APIs for a specific feature or scenario, and is the smallest organizational unit for APIs in Data Service. It corresponds to the group concept in API Gateway. When an API in Data Service is deployed to API Gateway, the system automatically creates a group with the same name in API Gateway.
How should I organize my API groups?
We recommend that you put APIs that serve the same purpose or have similar features into one group. For example, you can put two APIs that query weather by city name and by coordinates into a group named Weather Query.
Key concept
You can create up to 100 API groups under a single Alibaba Cloud account.
When should I enable pagination for API responses?
By default, an API returns a maximum of 2,000 records. If the response of an API may contain more than 2,000 records, enable pagination for the response. When an API has no request parameters, the response typically contains a large number of records, and the system enforces pagination.
If you have enabled Pagination for Return Results in the Response Parameters section of the right-side navigation pane on the API editing page, and you specify a limit clause in the Edit Query SQL section of the same page, the limit clause does not take effect. The number of returned records is determined by the Pagination for Return Results settings.
Do APIs created in Data Service support POST requests?
Yes. APIs created in Data Service support both GET and POST requests.
Do APIs created in Data Service support the HTTPS protocol?
Yes. APIs created in Data Service support both the HTTP and HTTPS protocols.
Scenarios for accessing RDS instances through Data Service
To better ensure the security of accessing RDS instances through DataWorks Data Service, the system displays different prompts and suggestions when you create APIs depending on the data source type (instance mode or connection string mode) selected when you add a data source. The following table describes the details:
|
Data source type |
Scenario |
Data Service resource group type |
|
|
Exclusive resource group for Data Service |
Shared Data Service resource group |
||
|
Instance Mode |
Access an RDS instance within the same tenant |
The Data Service API can be edited and saved as expected. |
The Data Service API can be edited and saved as expected. |
|
Access an RDS instance across tenants |
The Data Service API can be edited and saved as expected. |
An error is reported when you save the API: A security risk exists. You must use an exclusive resource group for Data Service. Go to the Resource Group page in the right-side navigation pane, select an exclusive resource group for Data Service, and then save the API again. Note We recommend that you Use exclusive DataService Studio resource groups. |
|
|
Connection String Mode |
- |
The Data Service API can be edited and saved as expected. |
An error is reported when you save the API: A security risk exists. You must use an exclusive resource group for Data Service. Go to the Resource Group page in the right-side navigation pane, select an exclusive resource group for Data Service, and then save the API again. Note If you have purchased an Alibaba Cloud RDS instance, try changing the data source type from Connection String Mode to Instance Mode in the Data source management so that you can continue to use the shared Data Service resource group. |