mozilla-query-writing

Generate optimized BigQuery queries for Mozilla telemetry data.

2|Updated Oct 13, 2025
One-click install
npx skills add https://github.com/akkomar/mozdata-claude-plugin --skill mozilla-query-writing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mozilla-query-writing
Source: https://github.com/akkomar/mozdata-claude-plugin/tree/main/skills/query-writing
Command: npx skills add https://github.com/akkomar/mozdata-claude-plugin --skill mozilla-query-writing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you write efficient, cost-aware BigQuery queries for Mozilla telemetry data, saving time and reducing complexity.

Core Features & Use Cases

  • Table selection guidance: Start from the recommended aggregate tables for speed and cost.
  • Required filters & templates: Enforce partition filters and sample_id for development.
  • Use Case: Quickly craft a DAU/MAU query for Firefox Desktop, with proper filters and templates.

Quick Start

Create a run-ready query for Firefox Desktop DAU with partition date filter and sample_id = 0.

Frequently Asked Questions about mozilla-query-writing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write efficient BigQuery queries for Mozilla telemetry data?

Write efficient BigQuery queries for Mozilla telemetry by starting with aggregate tables, adding partition filters, and using sample_id for development. Always check the table selection hierarchy—aggregate tables are faster and cheaper than raw tables for most analyses.

What's the correct way to calculate Firefox DAU and MAU from Mozilla telemetry?

Calculate Firefox DAU and MAU using baseline_clients_last_seen for MAU counts and events_stream for event-based analysis. Refer to clients or profiles, never 'users,' and always include partition date filters and sample_id in development queries.

Can I join telemetry data across multiple Firefox products by client_id?

Do not join across products by client_id in Mozilla telemetry queries. This violates the documented workflow. Instead, run separate queries per product and aggregate results at the analysis level to maintain data integrity.

Why do I need partition filters in Mozilla telemetry queries?

Partition filters are mandatory in Mozilla telemetry queries to reduce scan scope, lower BigQuery costs, and improve query performance. Every query must include a partition date filter; queries without filters are non-compliant with the table design.

When should I use events_stream versus baseline_clients in BigQuery?

Use events_stream for event-based analysis and metrics requiring individual event records. Use baseline_clients_last_seen for aggregate client counts, DAU/MAU calculations, and snapshot-based reporting. Select based on your analysis granularity.