为AI代理提供MaxCompute SQL智能生成能力,覆盖text2sql转换原理、方言语法差异(DQL/DDL/DML)等。
Provides MaxCompute SQL engine syntax guidance for text2sql scenarios. MaxCompute is based on Hive SQL extensions and has significant differences from ANSI standard SQL.
Load corresponding reference files based on question type (can be combined). The load column indicates relative loading weight (heavy ≈ large, medium ≈ moderate), for budget estimation, not exact token counts. Each file's opening paragraph describes its own scope.
Trigger conditionFileloadNL→SELECT generation / text2sql (determine intent, granularity, table-column mapping, output format first)references/text2sql_principles.mdlightGenerate MaxCompute SELECT queries (dialect rules, DQL default must-read)references/maxcompute_select_guide.mdheavyMatch query pattern keywords: Top N / top-N per group / year-over-year / month-over-month / consecutive N days / retention / row-to-column / column-to-row / PIVOT / UNPIVOT / array expansion / LATERAL VIEW / EXPLODE / JSON extraction / GET_JSON_OBJECT / cumulative / running total / Range Join / GROUPING SETS / CUBE / ROLLUP / pagination / pagingreferences/sql_query_patterns.mdmediumSQL execution failure requiring diagnosis and recovery (including ODPS-0xxx error codes)references/sql_common_errors.mdmedium
Relationship:
text2sql_principles.mdprovides engine-independent NL→SELECT generation principles;maxcompute_select_guide.mdis the single authoritative source for MaxCompute DQL dialect rules (unsupported syntax/functions/partitioning/types/SET parameters).sql_query_patterns.mdprovides query template snippets only, without duplicating rules.
The following scenarios exceed this skill's scope: