Pinterest Engineers Build Metrics Board for Scalable Agent-Ready Data Analytics
A centralized metric platform unifies governance, pipeline orchestration, and LLM agent discovery.
1Unified Platform Replaces Ad-Hoc Pipelines
Pinterest manages petabyte-scale data lakes with thousands of metrics created by hundreds of internal producers. Previously, teams wrote bespoke pipelines manually for reporting and experimentation. This created metadata drift, broken downstream pipelines, and redundant metrics. Metrics Board replaces manual plumbing with an end-to-end declarative platform.
2Declarative YAML Inventory as Source
Every metric is defined as a YAML specification within a dedicated Git repository. Definitions function as standard production code with versioning and review history. Instead of enforcing rigid abstract models over diverse tables, Pinterest chose flexible SQL inputs with explicit modeling parameters like temporal granularities and dimensional scopes.
3Form-Based UI Automates Code Changes
Data producers do not hand-craft raw YAML files directly. A dedicated UI guides users through structured input forms to define calculation parameters and integration destinations. The interface automatically renders compliant YAML and opens pull requests on the engineer's behalf, embedding strict governance seamlessly into developer workflows.
4Isolated Orchestration and Dynamic Parsing
Metrics Board transforms individual YAML definitions into isolated Airflow DAGs to compute historical and incremental data. Isolating DAGs prevents cascading workflow failures across business domains. Using sqlglot, the platform parses SQL to map upstream dependencies automatically, compiling target queries into SparkSQL or PrestoSQL on demand.
5Automated Upstream Ingestion and Backfills
Metric pipelines detect late-arriving upstream data automatically and pause execution until dependencies clear, resuming tasks without manual intervention. Historical backfills are coordinated directly inside Airflow DAGs. This automated operational management reduces metric development time from weeks down to one to two hours per pipeline.
6Dual-Engine Rule and Anomaly Validation
To prevent corrupt metrics, pipelines execute two quality validation layers alongside computation. Deterministic checks evaluate day-over-day, month-over-month, and year-over-year drift against thresholds or parent metrics. Concurrently, machine learning models evaluate seasonality and trend shifts to surface statistical anomalies that static rule sets miss entirely.
7Integrated Quality Reports and Alerts
Whenever validation thresholds fail, automated notifications alert metric owners in real time with snooze and acknowledge options. Pass rates, longitudinal time-series checks, and audit notes aggregate into exportable quality reports. Because validation rules live in the metric YAML spec, quality definitions evolve alongside pipeline logic.
8Two-Phase Publishing Fanout System
Downstream integrations synchronize via configuration flags without bespoke wiring. Metadata publishes at commit time into the PinCat data catalog and Helium experimentation engine before execution. Once computation finishes, data exports to Superset for BI visualization and StarRocks for fast querying, linking generated outputs back to DataHub.
9Metric Grading and Dashboard Tiers
Metrics receive certification grades from Unknown through A+ based on verified stewardship and validation coverage. Concurrently, Superset dashboards fall into three governance tiers. Tier 1 dashboards receive dedicated Presto compute lanes and permanent retention, whereas Tier 3 exploratory dashboards get garbage-collected automatically when unused.
10Exposing Governed Context to Agents
The structured metadata powering human discovery directly unlocks autonomous AI applications. Metrics Board exposes an MCP server interface allowing large language model tools to parse definitions. Pinterest's internal Analytics Agent queries this server, answering natural language questions grounded strictly in certified golden metrics rather than unverified queries.
11Adoption Velocity and Hours Saved
Adoption metrics demonstrate significant impact across Pinterest engineering and analytics teams. Roughly 150 new metrics launch monthly, with over 98% of experimentation metrics utilizing Metrics Board. One key engagement metric revamp project saved two engineering months, while platform-wide automation yields thousands of hours saved every month.
12Foundation for Enterprise Agentic Analytics
Standardizing metric definitions as declarative code resolves data drift across experimentation platforms and BI dashboards. More importantly, it demonstrates that human-centered data governance forms the prerequisite layer for reliable AI agents. Clean schemas, certified quality grades, and automated lineage prevent hallucinations across automated analytic environments.