Skip to content
cccskills
FreePublished on GitHub

query-odps

MaxCompute(ODPS)只读 SELECT 写法与执行纪律。**以下场景必须立即加载**:生成、改写或提交任何 ODPS / MaxCompute SQL(SELECT、WITH、JOIN、子查询、nl2sql);覆盖方言、分区、结构纪律、优化、字面量取值、执行纪律与失败回退。

The English summary is being prepared. Showing the original description.

See how to install

Files included (7)

  • SKILL.md2.6 KB
  • references/dialect-rules.md2.2 KB
  • references/error-recovery.md1.6 KB
  • references/partition-semantics.md1.8 KB
  • references/performance.md1.7 KB
  • references/sql-correctness.md2.6 KB
  • references/value-discovery.md1.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

query-odps

MaxCompute 只读 SELECT 的域规则:怎么写对 SQL、怎么优化、怎么自检、怎么执行、失败如何回退。

禁止:直连 PyODPS;绕过标准执行通道自写 CSV。

规则索引

场景读
写 SQL(方言)references/dialect-rules.md
分区 / MAX_PTreferences/partition-semantics.md
SELECT 结构references/sql-correctness.md
性能 / 扫描references/performance.md
业务字面量 → 库内值references/value-discovery.md
失败回退references/error-recovery.md

核心原则

  1. 先取证 — 无元数据不臆测表名、列名、口径。
  2. 过滤值与 JOIN 键先定再写 SQL — 时间范围、分区边界、维度筛选、业务字面量对应的库内取值等 全部确认 后再生成 SQL;不得在 WHERE 里留臆测的枚举或占位过滤值。未映射的字面量确认参考 value-discovery.md。涉及 JOIN 时同理:写 ON 之前先对齐左右两边的连接键——列名是否同一实体、类型是否一致、格式是否同口径(如 user_id 是否都带前缀、ds 是 yyyyMMdd 还是 yyyy-MM-dd、STRING 是否需 TRIM/CAST);禁止在未核实键格式时直接拼 JOIN。
  3. 分步查询,勿一次开大 SQL — 执行结果会落入 ODPS 临时表(如 cm_tmp_*),应拆成可快速校验的小步:探针 / 单表过滤 / 中间结果落表 → 再基于临时表做下一步。禁止 一次性提交超大、多表深 JOIN、长窗口的「一步到位」SQL;一旦口径或 JOIN 键有误,会等非常久才失败,用户无法及时发现问题。
  4. 性能纪律 + 执行前自检 — 写 SQL 前 必须读 references/performance.md(分区必过滤、列裁剪、先聚合再 JOIN 等);定稿后再对照 performance.md、partition-semantics.md 等 references 自检,明显违规 不得执行。ODPS 按扫描量计费,忽视此项会导致超时或严重资源浪费。
  5. 只走标准执行通道 — SELECT 仅经平台提供的执行通道提交;禁止 PyODPS 直连或自写 CSV。结果落盘路径由运行环境决定;truncated 须在回复中说明;禁止把超大结果全量贴进对话。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

将用户的数据分析需求转化为结构化的分析计划并与用户确认。用户提出 BI 业务分析、数据探索、统计建模等需要规划的分析任务时使用。简单数据查询、公式明确的定量计算等流程简单、无需规划的任务不使用。

The English summary is being prepared. Showing the original description.

agentscope-ai/QwenPaw-Data166Updated Oct 20, 2026

通过量化历史数据的自然波动幅度,自适应计算判定阈值。当需要从数据本身确定阈值(如波动阈值、影响度阈值等)、而非使用固定值时调用。仅适用于日/周粒度阈值确定。

The English summary is being prepared. Showing the original description.

agentscope-ai/QwenPaw-Data166Updated Oct 20, 2026

基于阈值检测时间序列中的显著异常波动点。当需要找出指标异常波动日期、识别数据异动时调用。

The English summary is being prepared. Showing the original description.

agentscope-ai/QwenPaw-Data166Updated Oct 20, 2026

计算各维度(组)值对指标变动的贡献度,支持可加型量值指标和加权平均型/率值指标。当需要计算贡献度、解释指标"为什么涨/跌"时调用。

The English summary is being prepared. Showing the original description.

agentscope-ai/QwenPaw-Data166Updated Oct 20, 2026

从运营周报、活动文档、对话输入或文档工具 API 中提取业务事件,与指标异常时间窗口对齐,生成有证据支撑的因果归因假设并排序。当已知指标存在异常波动、需要从外部文档证据中解释"为什么"时调用。

The English summary is being prepared. Showing the original description.

agentscope-ai/QwenPaw-Data166Updated Oct 20, 2026

对用户、产品等业务对象做分群:用波士顿矩阵法做象限分群,或用分层聚类、K-means、DBSCAN 等聚类技术分群。当需要做客群/产品分群、象限策略、画像或密度型子结构发现时调用。触发条件:当对话中出现“分群”、“分类”、“聚类”、“不同类型”、“不同场景”等体现分群分析词语时触发。

The English summary is being prepared. Showing the original description.

agentscope-ai/QwenPaw-Data166Updated Oct 20, 2026

See all skills by agentscope-ai

Report a problem with this skill