This topic describes how to use the DLA Presto-compatible SQL CU edition.
- Create a virtual cluster (VC).
Unlike the serverless SQL edition, you must create a VC before you execute SQL statements in the DLA Presto-compatible SQL CU edition.For more information, see Manage virtual clusters.Note When you create a VC, select SQL from the Engine drop-down list.
- Configure the network for accessing data sources of DLA.Note To enable DLA to access data sources within your VPC, such as ApsaraDB RDS for MySQL and AnalyticDB for MySQL, you must configure the network for the data sources. Skip this step if no connection is required.
- Before you configure the network, you must authorize your DLA account to access VPC-related APIs. For more information, see Access your VPC.
- On the Virtual Cluster management page, find your cluster and click Details in the Actions column.
- Click Add Data Source Network, and enter the IDs of the vSwitch and the security group to which the data source
you want to access belongs.
You can obtain the vSwitch ID from the Basic Information tab of the data source. The following figure shows the Basic Information tab of RDS.
You can obtain the security group ID from the VPC console.Note If multiple security groups are displayed, select one security group that can access the data source.
- Execute SQL statements.
For the CU edition, when you create a VC and start to execute SQL statements for the first time, the system automatically generates a public dataset.Select the public_dataset_xxx dataset from the list on the left and execute the following SQL statement:
/*+pool-selector=dladw*/SELECT * FROM `nation` LIMIT 20;Note
pool-selectorspecifies the name of the VC that you created.
For more information about how to execute DLA SQL statements, see Common SQL statements.