Creating a Managed Service for YDB connection
Note
To create a connection, you will need a service account with the ydb.viewer or viewer role.
To write subqueries in datasets and queries in QL charts, use YQL syntax
To create a Managed Service for YDB connection:
-
Open the page for creating a new connection
. -
Under Files and services, select the YDB connection.
-
Specify the connection parameters:
- Cloud and folder. Select the folder where your service account will be located.
- Service account. Select an existing service account or create a new one.
- Database. Select the database to connect or create a new one.
Warning
Capital letters are not allowed in YDB database column names.
- Cache TTL in seconds. Specify the cache time-to-live or leave the default value. The recommended value is 300 seconds (5 minutes).
- Raw SQL level. Enables you to use an ad-hoc SQL query to generate a dataset.
-
(Optional) Make sure the connection works properly. To do this, click Check connection.
-
Click Create connection.
-
Select a workbook to save your connection to or create a new one. If using legacy folder navigation, select a folder to save the connection to. Click Create.
-
Enter a name for the connection and click Create.
RESOURCE_EXHAUSTED error
If the Managed Service for YDB quotas and limits are exceeded, you may get the RESOURCE_EXHAUSTED
error message. To avoid the error, follow these recommendations:
- Reduce the query rate. To achieve this, you can use filters or specify only the required chart fields to limit the amount of data you get.
- Follow the recommendations for query optimization.
- Use the DataLens chart inspector to assess the data amount and upload time.
- Refer to the Managed Service for YDB monitoring charts to see of the quotas and limits are exceeded. If you need to, you may slightly increase the request unit (RU) limit under Limits.
Note
Increasing the throughput limit in the serverless database settings may result in high usage costs. Since serverless DB resources are indefinitely large, the maximum consumption of RUs over a period of time can also reach any value, leading to excessive charges. When changing it, increase the value by only a very small amount, e.g., by 10 RUs per second.