Design A Spreadsheet Interface Over A Billion Row Warehouse Table
Last updated: November 29, 2026
Quick Overview
Design the backend that lets a business user scroll, sort, filter, group and add formula columns on a billion-row table in the customer's cloud warehouse with spreadsheet-like responsiveness, without copying the data out of the warehouse.
Sigma Computing
November 29, 20260
0
0 solved
Design the backend that lets a business user scroll, sort, filter, group and add formula columns on a billion-row table in the customer's cloud warehouse with spreadsheet-like responsiveness, without copying the data out of the warehouse.
This is the defining architecture problem of Sigma's product: live query pushdown to Snowflake, Databricks or BigQuery behind a grid that must feel instant. Interviewers probe the query compiler, caching layers, cancellation of stale queries, and warehouse cost, more than generic web scaling.
What the Interviewer Expects
- Keep data in the warehouse and compile UI state into SQL rather than extracting
- Separate the visible window (paged rows) from aggregates and counts
- Cancel superseded queries as the user keeps typing or scrolling
- Layer caching: result cache keyed by canonical SQL, plus materialized intermediate results
- Respect warehouse concurrency limits and cost per customer
- Enforce permissions and row-level security inside the generated SQL
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you return a row count for the scrollbar without a slow COUNT(*) on every change?
- When should a workbook element be materialized into a warehouse table, and how is it refreshed?
- How do you keep pagination stable when the sort key has ties?
- What happens when one customer's warehouse is suspended or out of credits?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: browse rows, sort, filter, group with subtotals, add formula columns, see a total count and a few aggregates. Non-functional: first rows in under about 2 seconds on a warm warehouse, inter...
High-Level Design
Browser grid (virtualized) sends a declarative workbook spec: source table, ordered column definitions, filters, grouping, sort, and the requested row window. A query service compiles the spec into SQ...