Propose a technical architecture for a centralized Metrics Layer or Metrics Store

This tests your ability to decouple metric semantics from storage and query tools. A strong answer outlines a semantic layer with versioned definitions, a query API, and enforced downstream consumption.
What's really being asked
The interviewer wants to know if you understand that metric inconsistency is an architecture problem, not a documentation problem. They are looking for familiarity with the semantic layer pattern: moving metric definitions out of individual dashboards, notebooks, and ETL scripts into a governed, versioned system that serves as the single source of truth for business logic.
The full answer
First, a metric registry or semantic layer where definitions like active user are declared as code, stored in git, and owned by data engineering or analytics engineering. Second, a query planner or API tier that sits between BI tools and the data warehouse, translating high level metric requests into optimized SQL or OLAP queries against raw or modeled tables. Third, a caching or materialization strategy, such as precomputed aggregates or a cube service, so the layer does not add unacceptable latency at scale. Fourth, governance and access controls, including breaking change review, deprecation policies, and discoverability via a data catalog, so teams cannot bypass the layer.
The mistakes people make
Proposing a single shared database view or a wiki page with the definition. Views lack versioning and governance, and teams still copy SQL into local scripts. Suggesting a data lakehouse alone without a semantic abstraction. Recommending a heavyweight monolithic ETL rewrite instead of an incremental API layer. Ignoring performance and suggesting on the fly joins across petabytes of raw event data for every dashboard query.
What usually comes next
How would you handle a breaking change to the active user definition when fifty dashboards depend on it? How do you enforce that teams route through the metrics layer instead of writing direct warehouse queries? What is your rollout strategy: do you materialize metrics eagerly or compute them lazily? How do you reconcile real time streaming metrics with batch historical metrics in the same layer?
A concrete example
Imagine three teams define active user differently: product counts unique device IDs in the last thirty days, finance counts paying users with revenue in the last thirty days, and marketing counts anyone who opened an email. In the metrics layer, each definition is a named, versioned entity in the registry: active_user_product_v2, active_user_finance_v1, and active_user_marketing_v1. A product manager queries active_user_product_v2 through the metrics API. The query planner maps this to a precomputed aggregate table refreshed daily, or falls back to a SQL template joining events and devices. When product wants to change the window to seven days, they open a pull request, the data team reviews downstream impact via lineage metadata, and the API begins serving v3 while v2 is deprecated with a sunset date. No team rewrites SQL in Looker, Tableau, or Jupyter.
Interview question
Which architectural approach best solves metric inconsistency when teams define KPIs differently across dashboards and notebooks?
- a.A shared database view referenced by all BI tools and notebooks
- b.A version-controlled semantic layer with a query API and governance controlsCorrect
- c.A unified data lakehouse consolidating all raw tables into one storage system
- d.A team wiki with standard metric definitions and approved SQL snippets
Why? this is the answer
A semantic layer codifies definitions in git and enforces consumption through a query API, ensuring a single source of truth. A shared database view lacks versioning and governance, so teams often copy SQL into local scripts and silently diverge.
Just read this? Test yourself on what you have been reading.
Read the original → thenewstack.io
- #metrics layer
- #semantic layer
- #data architecture
- #analytics engineering
- #governance
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles