The MaxCompute compiler is based on the new-generation SQL engine of MaxCompute V2.0. This simplifies the SQL compilation and improves language expressions. This topic describes how to use errors and alerts in the MaxCompute compiler for troubleshooting.
We recommend that you use MaxCompute Studio in combination with the compiler. This improves the usability of the MaxCompute compiler.
- In the first INSERT statement, an error occurs on the use of the wm_concat function.
- In the second INSERT statement, a column name error occurs and a data type conversion alert is generated. In MaxCompute, if a BIGINT value is compared with a DOUBLE value, an implicit conversion to the DOUBLE type is performed. A conversion error may occur. Therefore, the MaxCompute compiler generates an alert for you to check whether the conversion meets your expectation.
After the modification, submit the script again.
This way, no errors are missed.
Before you submit scripts, we recommend that you use MaxCompute Studio to perform static compilation checks for the scripts. We also recommend that you use MaxCompute Studio to specify alerts as errors and handle all alerts before you submit the scripts. This saves time and resources. If you submit a script with errors, your health score is reduced. This affects the priorities and order that you use to submit tasks. In later versions, unhandled alerts will be considered as a factor of the health score system. Therefore, you can fully utilize the details of the errors and alerts in the MaxCompute compiler to avoid priority downgrade.
Some alerts indicate the implicit type conversions that are not secure. If you are sure of a conversion, use cast (xxx as) to clear the alert. The MaxCompute compiler also allows you to use (xxx) to clear alerts.