This topic describes how to develop and submit an SQL script in MaxCompute Studio.
Prerequisites
- MaxCompute Studio is connected to a MaxCompute project. For more information, see Manage project connections.
- A MaxCompute script module is created. For more information, see Create a MaxCompute script module.
Write an SQL script
Submit an SQL script
Before you submit an SQL script, you must configure compilation parameters based on
your business requirements. MaxCompute Studio provides various compilation parameters.
You can configure the parameters in the toolbar above the editor. You can configure
the following compilation parameters:
- Editor mode:
- Statement Mode: In this mode, the editor separates the SQL statements in the script with semicolons
(
;
) and submits the statements one by one to the MaxCompute server. MaxCompute executes the statements one by one. - Script Mode: This is the most recent development mode. In this mode, the editor submits the whole script to the MaxCompute server at a time for overall optimization. We recommend that you use this mode to improve the execution efficiency.
- Statement Mode: In this mode, the editor separates the SQL statements in the script with semicolons
(
- Type System: You can configure this parameter to prevent compatibility issues when
you execute SQL statements. Valid values:
- Legacy TypeSystem: indicates the MaxCompute V1.0 data type edition.
- MaxCompute TypeSystem: indicates the MaxCompute V2.0 data type edition.
- Hive Compatible TypeSystem: indicates the Hive-compatible data type edition.
- Execution mode
- Default Version: indicates that a stable version is used.
- MaxCompute Query Acceleration: indicates that the MaxCompute query acceleration (MCQA) feature is enabled to run a job.
- Rerun When Acceleration Fails: indicates that the system reruns a job if query acceleration fails.