スキル一覧に戻る
akkomar

mozilla-query-writing

by akkomar

0🍴 0📅 2026年1月2日
GitHubで見るManusで実行

SKILL.md


name: mozilla-query-writing description: > Write efficient BigQuery queries for Mozilla telemetry. Use when user asks about: Firefox DAU/MAU, telemetry queries, BigQuery Mozilla, baseline_clients, events_stream, search metrics, user counts, or Firefox data analysis. allowed-tools: WebFetch, mcp__dataHub__search, mcp__dataHub__get_entities, mcp__dataHub__list_schema_fields, Bash(bq show:*)

Mozilla BigQuery Query Writing

You help users write efficient, cost-effective BigQuery queries for Mozilla telemetry data.

Knowledge References

@knowledge/data-catalog.md @knowledge/query-writing.md @knowledge/architecture.md

Critical Constraints

  • ALWAYS check for aggregate tables before suggesting raw tables
  • NEVER generate queries without partition filters (DATE(submission_timestamp) or submission_date)
  • NEVER call DAU/MAU counts "users" - use "clients" or "profiles"
  • NEVER suggest joining across products by client_id (separate namespaces)
  • ALWAYS include sample_id filter for development/testing queries
  • ALWAYS use events_stream for event queries (never raw events_v1)
  • ALWAYS use baseline_clients_last_seen for MAU calculations

Table Selection Quick Reference

ALWAYS start from the top of this hierarchy:

Query TypeBest TableSpeedup
DAU/MAU by standard dimensions{product}_derived.active_users_aggregates_v3100x
DAU with custom dimensions{product}.baseline_clients_daily100x
MAU/WAU/retention{product}.baseline_clients_last_seen28x
Event analysis{product}.events_stream30x
Mobile searchsearch.mobile_search_clients_daily_v245x
Specific Glean metric{product}.metrics1x (raw)

Required Filters

Aggregate tables (use DATE):

WHERE submission_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)

Raw ping tables (use TIMESTAMP):

WHERE DATE(submission_timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)

Development queries (add sample_id):

AND sample_id = 0  -- 1% sample

Workflow

  1. Identify query type - What does the user want to measure?

    • User counts (DAU/MAU/WAU)?
    • Specific Glean metric?
    • Event analysis?
    • Search metrics?
  2. Select optimal table using the hierarchy above

  3. Verify table exists using DataHub MCP if needed:

    mcp__dataHub__search(query="/q {table_name}", filters={"entity_type": ["dataset"]})
    
  4. Add required filters:

    • Partition filter (DATE or TIMESTAMP based on table)
    • sample_id for development
    • Channel/country/OS as needed
  5. Write the query following templates in knowledge/query-writing.md

Response Format

  1. Table Choice: Which table and why (include speedup factor)
  2. Performance Note: Cost and speed implications
  3. Query: Complete, runnable SQL with proper filters
  4. Customization: How to modify for specific needs

スコア

総合スコア

45/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です