AGENT SKILL

sql-reporting

Conventions and review steps for writing analytics SQL against the warehouse. Use whenever the task involves querying tables, building a report, or aggregating metrics.

适用职业数据分析师
使用场景后端与接口
License 许可
Apache-2.0
所属仓库
apache/airflow
最近更新
2026-11-11
Stars
★ 4.7w
Forks
1.8w

01 前言 Front Matter

name
sql-reporting
license
Apache-2.0
description
Conventions and review steps for writing analytics SQL against the warehouse. Use whenever the task involves querying tables, building a report, or aggregating metrics.

03 SKILL.md 正文

<!-- SPDX-License-Identifier: Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0 -->

SQL Reporting Skill

Apply this skill before writing or running any analytics SQL so reports stay consistent and safe.

When to Use This Skill

Use this skill when the task involves:

  • Querying warehouse tables for a metric, report, or dashboard figure
  • Aggregating rows (counts, sums, rolling windows)
  • Cross-referencing two or more tables

Conventions

  1. Always SELECT explicit column names, never SELECT *.
  2. Filter on a partition/date column first to bound the scan.
  3. Alias aggregates with snake_case names (order_count, not count(*)).
  4. Cap exploratory queries with LIMIT unless an aggregate already collapses the result set.
  5. Prefer COUNT(DISTINCT ...) over a sub-query when de-duplicating.

Review Checklist (run before returning an answer)

  • [ ] No SELECT *.
  • [ ] A date or partition predicate is present.
  • [ ] Every aggregate has an explicit alias.
  • [ ] The query reads only from tables the task actually needs.

Output Format

Return the final SQL in a fenced ```sql block, then one sentence describing what the query returns.

04 同仓库更多 Skills

apache
apache/airflow

aip-tracker

Track Airflow Improvement Proposal (AIP) implementation progress by comparing Confluence specs against codebase evidence. Use when asked to assess, report on, or compare AIP status.

★ 4.7w
apache
apache/airflow

upgrade-fab-provider

Upgrade the pinned Flask-AppBuilder (FAB) dependency in the Apache Airflow FAB provider (`providers/fab/`). Bumps the exact `flask-appbuilder==` pin and its mirror constant, regenerates `uv.lock`, drives the `test_fab_alignment.py` drift tripwire, reviews the vendored security-manager `override.py` against the new upstream FAB, and conditionally re-vendors static assets / DB migrations. Use when asked to "upgrade FAB", "bump flask-appbuilder", or move the FAB provider to a newer Flask-AppBuilder release.

★ 4.7w
apache
apache/airflow

prepare-providers-documentation

Replace the manual commit-by-commit classification step in `breeze release-management prepare-provider-documentation` with AI-driven classification. For each provider with pending changes, analyze every PR (batched into one sub-agent per provider, not one per PR), pay special attention to potentially breaking changes by inspecting the actual diff, scope multi-provider PRs to the current provider's slice, ask the release manager when uncertain, and apply version bumps + changelog entries. Use during the regular provider release cycle as an alternative to the interactive breeze prompts.

Skill与智能体开发
★ 4.7w
apache
apache/airflow

airflow-translations

Add or update translations for the Apache Airflow UI. Guides through setting up locales, scaffolding translation files, translating with locale-specific guidelines, and validating results. Use when working with i18n tasks in airflow-core/src/airflow/ui/public/i18n/locales/.

★ 4.7w
apache
apache/airflow

airflow-publish-changes

Prepare or carry out authorized publication of Apache Airflow changes, including remote checks, pre-push verification, PR creation, and tracking deferred work. Also use when planning these steps or managing contribution issues.

★ 4.7w
apache
apache/airflow

airflow-pr-draft-summary

Draft Apache Airflow commit messages, PR titles and descriptions, or GitHub comments and reviews. Also use for release-note decisions when preparing a contribution.

★ 4.7w