Metric Semantic Layer: How Lyft Governs and Scales Key Data Definitions
Lyft built a Metric Semantic Layer (MSL), a versioned Python package that stores each company-wide "Golden Metric" as YAML metadata plus Jinja-templated SQL, so a definition is updated once and flows to every downstream consumer. Python APIs generate or execute SQL for chosen dimensions and time granularity, and they feed dashboards, Airflow, ML workflows, an Amundsen catalog integration, a no-code Metric UI, and an MCP server that grounds AI agents. Governance admits only metrics with at least two distinct use cases. Each one has a team-level Business Owner for metric health and an Operational Owner for data health, and both must approve every definition change. Lyft is now evaluating a vendor-managed semantic layer to integrate with more BI tools and databases.
Related posts
- Metrics Board: Building an Agent-ready Metrics Layer
Pinterest Engineering mediumAdeptPinterest's Metrics Board is a thin semantic layer where each metric is defined once as a YAML spec in Git, with arbitrary SQL plus temporal and modelling metadata, instead of being forced into a strict semantic model. Each definition generates its own Airflow DAG with sqlglot-derived upstream dependency sensors, rule-based and ML anomaly validations, and automatic publishing to DataHub, the Helium experimentation platform, Superset and StarRocks. Metric certification grades and dashboard tiers act as trust signals, and an MCP server exposes certified definitions to an analytics agent. Metric creation dropped from days or weeks to 1–2 hours, and over 98% of experiment metrics now go through the platform.
- Data Lineage at Slack
Slack Engineering mediumAdeptSlack built a central Data Lineage Service that automatically captures table- and column-level lineage by hooking Airflow success callbacks and dashboard audit logs, then parsing the submitted SQL with ANTLR (backed by a large unit-test suite). Raw lineage lands in RDS MySQL, and a daily Spark job uses Pregel to traverse the dependency graph and write a flattened Hive table with a 'layer' column, so transitive downstream dependencies come back from a single query. A Data Portal notify feature uses this lineage to message downstream owners in Slack about deprecations and retention changes. Lineage for non-SQL Spark jobs, a graph database and automated schema-change alerts are listed as future work.
- DataJunction as Netflix’s answer to the missing piece of the modern data stack
Netflix TechBlog easyNoviceNetflix adopted DataJunction (DJ), an open-source semantic layer, to centralize metric and dimension definitions after onboarding a single metric to its experimentation platform took weeks. DJ beat Mando and Airbnb's Minerva mainly on its SQL parsing and generation engine and on storing definitions in a connected graph. Built as an under-resourced side project for over two years, it prioritized an API-first, graph-first core and used cubes as the consumption protocol. Cubes can be materialized into Druid and linked back from dashboards in Data Explorer and Superset to their definitions. Next steps are unifying general analytics across Netflix and grounding internal LLMs in DJ-defined metrics.
- Beyond the Dashboard: Accelerating Real-Time Intelligence in the Age of AI
Booking.com Engineering easyNoviceBooking.com built a "talk to your data" self-serve analytics setup on Snowflake: semantic views define consistent business metrics, dimensions and table relationships, and Snowflake Agents translate natural-language questions into SQL against them. Answers produced from expert-verified queries are badged as verified. Changes to semantic definitions go through dbt and GitLab merge requests that need two approvals. A worked example uses Tableau workbook telemetry from the Hadoop-to-Snowflake migration. Acknowledged tradeoffs are semantic-layer maintenance debt, higher compute and token costs (mitigated with dedicated warehouses, timeouts and guardrails), and silent hallucinations on unverified questions.
- How Meta understands data at scale
Meta Engineering mediumAdeptMeta's Privacy Aware Infrastructure builds data understanding by schematizing every data asset in a canonical Thrift-based format (DataSchema, covering over 100 million schemas across 100+ systems) and annotating fields with a universal privacy taxonomy of semantic types. Annotation is shifted left into developer workflows. A classification pipeline of scheduling, sampling, scanning, heuristics and ML models predicts labels, auto-assigns them above a confidence threshold, and propagates them along lineage so copies inherit equivalent classifications. A Facebook Dating religious-views walkthrough shows how schema, annotation and OneCatalog inventory let purpose-limitation controls follow sensitive data across heterogeneous systems.