The MaxCompute console provides the sql analysis feature for running SQL statements and managing the MaxCompute data catalog. This topic describes how to use the sql analysis feature to access MaxCompute.
New SQL analysis
To keep pace with cloud-native technologies and meet growing demands for complex data analytics, the sql analysis feature in the Alibaba Cloud MaxCompute console has been fully upgraded. It integrates deeply with DataWorks's new data analysis feature to provide a more efficient, intelligent, and unified data analysis and metadata management experience. The new sql analysis supports the following features:
-
Intelligent sql editor: Edit and run SQL commands, try out product features, and develop and debug your daily SQL code.
-
Data catalog: Manage metadata for various MaxCompute objects, including projects, schemas, tables, and views.
-
Public datasets : Explore built-in MaxCompute public datasets and SQL demo scripts. You can open the corresponding SQL files and run the code to quickly try out MaxCompute.
Enable the new SQL analysis
Prerequisites
-
The new sql analysis is available in the following regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), China (Zhangjiakou), China (Ulanqab), China (Chengdu), China (Hong Kong), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Japan (Tokyo), Germany (Frankfurt), US (Silicon Valley), US (Virginia), UK (London), and UAE (Dubai).
-
You have activated MaxCompute and DataWorks.
-
You have activated a DataWorks resource group.
-
You have created a MaxCompute project.
Procedure
-
Log in to the MaxCompute console and select a region in the upper-left corner.
-
In the left-side navigation pane, choose .
-
In the dialog box that appears, activate DataWorks. If DataWorks is not activated, click Activate Now when prompted. After DataWorks is activated, click Try New Version to open the new SQL Analysis page.
-
To use the new sql analysis, you must activate DataWorks and a DataWorks resource group. For more information about the editions of DataWorks, see Features of DataWorks editions.
-
Ensure you have activated the pay-as-you-go (free) DataWorks Basic Edition or a higher edition.
-
Ensure you have activated a DataWorks resource group. If you purchased a legacy resource group, go to the console. For more information about the differences between new and legacy resource groups, see DataWorks resource groups.
-
-
Be aware of the change in how SQL files are managed: The new sql analysis provides a personal folder to create and manage SQL directories and files in the cloud. Local files from the old workspace are not automatically synchronized to the personal folder. We recommend that you manually move them to your personal folder for future editing.
-
Features
The new sql analysis includes the following key modules:
-
Resource manager: Manages MaxCompute SQL script files. For more information, see Use the resource manager and search feature.
-
Data catalog: Manages and operates on MaxCompute metadata. For more information, see Use the data catalog.
-
SQL editor: Edits and runs MaxCompute SQL scripts. For more information, see Use the editor for sql analysis.
Resource manager and search
The new sql analysis provides a resource manager and a search feature.
-
Resource manager: Manages sql analysis script files and provides several resource directories.
-
Search and replace: Supports global search across the content of all files in the resource manager and allows you to replace keywords with other statements.
|
Directory type |
Description |
|
Personal folder (recommended) |
Go to .
|
|
Workspace |
Go to . For users who have used the previous version of sql analysis, the resource manager retains the original workspace directory and SQL script files by default. For users who have not used the workspace in the previous version of sql analysis, this module is hidden by default. We recommend that you use the new personal folder.
Note
To ensure data security, you must manually grant access to all files in a specified folder each time the page tries to read a local folder. Alibaba Cloud does not store the content of local folders on its servers. |
|
Public dataset demo |
Go to .
|
Data catalog
The new sql analysis includes a data catalog module that provides a unified interface to manage MaxCompute metadata. This feature supports creating and managing data objects such as tables, views, external tables, resources, and functions. It supports the following key features:
|
Feature |
Description |
|
Add and remove projects |
Go to .
|
|
Manage the data catalog |
Go to .
|
|
Public datasets |
Go to .
|
SQL editor
The new sql analysis provides a powerful editor that lets you write SQL scripts to process and query data in MaxCompute. It supports common SQL operations such as SELECT, INSERT, UPDATE, and DELETE, as well as MaxCompute-specific syntax and functions. For more information, see SQL overview.
The editor page includes the following features:
|
Area |
Description |
|
Editor area |
|
|
Runtime parameters |
|
|
Results area |
|
The SQL editing feature of the new sql analysis is based on the new data analysis capabilities of DataWorks. For more information about developing MaxCompute SQL nodes, see MaxCompute SQL node.
Version comparison
|
Item |
SQL analysis (previous version) |
SQL analysis (new version) |
|
Product dependencies |
Activate MaxCompute. |
|
|
Resource manager |
Provides a workspace to manage SQL scripts based on a local file directory. |
Provides a personal folder to create and manage SQL directories and files in the cloud. |
|
Data catalog |
Supports viewing MaxCompute objects such as tables, views, external tables, resources, and functions. |
Supports creating and managing MaxCompute objects such as tables, views, external tables, resources, and functions. |
|
SQL editor |
Supports basic SQL script editing and execution. |
Based on the new data analysis capabilities of DataWorks, it provides a more intelligent sql analysis experience. |
Log: The log content for each execution.
Analysis: Supports simple chart-based analysis.