Data Warehousing and Data Lakes Questions
Architecture of warehouses, data lakes, and lakehouses: storage-compute separation, medallion/zoned layouts, and when each is appropriate. Covers governance of a lake, table formats, and the trade-offs between warehouse-first and lake-first analytics stacks. A core infrastructure-design topic for analytics platforms.
What's the fundamental difference between a data warehouse and a data lake? Walk through storage format, schema enforcement, typical users, and query patterns, and give one concrete scenario where you'd pick a warehouse and one where you'd pick a lake.
Sample Answer
A data warehouse stores curated, structured data that's been cleaned and modeled ahead of time so business queries run fast and consistently. A data lake stores data closer to its raw form (structured, semi-structured, or unstructured) and defers structure until someone actually reads it. The practical consequence: a warehouse trades flexibility for speed and consistency; a lake trades speed and consistency for flexibility and scale.
The core comparison
| Dimension | Data warehouse | Data lake |
|---|---|---|
| Schema | Schema-on-write: enforced before load | Schema-on-read: applied when queried |
| Data types | Mostly structured, modeled tables | Structured, semi-structured, and unstructured |
| Typical users | Analysts, business intelligence (BI) tools, executives | Data scientists, ML engineers, data engineers |
| Query pattern | Predictable SQL, aggregations, dashboards | Exploratory, ad hoc, large scans, iterative |
| Storage cost | Higher per byte (structured, indexed) | Lower per byte (object storage) |
| Governance | Easier: one modeled, access-controlled layer | Harder: raw data needs its own controls |
The underlying reason for both approaches to exist is workload shape, not one being a strictly better version of the other. A warehouse is built around Online Analytical Processing, meaning many people running similar, well-known aggregation queries against a stable schema. A lake is built around the opposite assumption: you don't fully know the query shape yet, or the data doesn't have a stable shape to begin with.
Worked example
Say a company wants two things: a finance dashboard showing daily revenue by region, and a churn model trained on raw clickstream and support-ticket text.
The finance dashboard is Online Analytical Processing (OLAP) focused: the questions are known in advance ('revenue by region, by day'), the source data (orders, refunds) is already structured, and the business needs a single trustworthy number every day. That's a warehouse: model orders and refunds into a small star schema, enforce the schema so a bad refund record can't silently corrupt the total, and let the BI tool query modeled tables directly.
The churn model is ML-focused: the useful signal might be in raw event sequences or unstructured ticket text that nobody has modeled yet, the feature set will change every time someone retrains, and enforcing a rigid schema up front would throw away exactly the raw detail the model needs. That's a lake: land the raw events and ticket text as-is, and let the data science team iterate on feature extraction without waiting on a schema migration each time.
Trade-offs and pitfalls
The most common mistake is treating the lake as a substitute for governance rather than a different governance problem. Because a lake accepts anything, it's easy to end up with an ungoverned pile of files nobody trusts (sometimes called a 'data swamp'): if nobody owns metadata, lineage, or quality checks on the lake side, exploratory work slows down instead of speeding up.
The second common mistake is assuming a warehouse can't hold semi-structured data at all. Most modern warehouses support semi-structured columns (JSON or similar variant types), so the real dividing line isn't 'structured versus everything else,' it's whether the schema is enforced and stable versus deferred and evolving. Most real organizations end up running both: a lake for raw ingestion and exploration, and a warehouse (or a curated layer within a lakehouse) for the numbers the business depends on every day.
You're evaluating whether to move an analytics workload from one managed cloud warehouse to another, say BigQuery to Snowflake. Walk through how you'd actually decide: what would you look at, and how would you structure a pilot to compare the two before committing?
Sample Answer
Deciding whether to actually move a workload between managed cloud warehouses comes down to whether the new platform meaningfully improves something the current one is failing at (performance, cost, or a capability gap), because a migration is expensive enough that 'roughly comparable' isn't a good enough reason to do it.
What I'd actually look at
Performance for your real workload, not a generic benchmark: how the specific queries your dashboards and reports run today perform on the candidate platform, at your actual data volumes and concurrency levels.
Cost, modeled against your real usage pattern, not list pricing: whether your workload is steady (favoring predictable, reserved-style pricing) or bursty (favoring on-demand, pay-per-query pricing), since the two platforms may price these patterns very differently.
Feature and ecosystem fit: whether your existing Business Intelligence (BI) tools, orchestration, and data-loading tools connect natively, and whether any platform-specific feature your team actually relies on today (a particular semi-structured data type, a specific data-sharing capability) has an equivalent on the other side.
Operational overhead: how much day-to-day tuning, maintenance, and specialized expertise each platform demands from your team, since a technically superior platform that needs skills your team doesn't have yet has a real, ongoing cost.
Worked example: structuring the pilot
Rather than a broad, open-ended trial, I'd scope a pilot around a small number of representative, real workloads, not synthetic benchmarks: for instance, one high-concurrency dashboard, one heavy nightly aggregation job, and one workload involving your messiest semi-structured data.
Run both platforms side by side against the same real queries and data for a few weeks, and measure the things that actually matter for the decision: query latency at your typical concurrency, the modeled cost for your specific usage pattern (not vendor list pricing), and how much manual tuning or troubleshooting effort each platform required from your engineers to hit acceptable performance.
At the end, the honest output isn't just 'platform B was 20 percent faster'; it's whether that improvement, weighed against migration cost, cost difference, and any features you'd gain or lose, clears the bar to justify moving a live production workload.
Trade-offs and pitfalls
The most common mistake is running the pilot on a clean, synthetic dataset that doesn't reflect your real data's messiness (skew, semi-structured fields, unusual query patterns), which can make a migration look like a clear win in the pilot and then underperform once real production traffic and data quirks hit it. The second is underweighting operational overhead: a platform that benchmarks faster but requires ongoing specialized tuning your team doesn't have the bandwidth for can end up costing more in engineering time than it saves in compute cost.
A team is debating whether to adopt a lakehouse or keep maintaining a separate data lake plus a commercial data warehouse. Walk through how you'd actually make that call, and where the real trade-offs tend to show up.
Sample Answer
There's no universal winner here: a lakehouse consolidates a lake and a warehouse into one platform with transactional guarantees on top of cheap object storage, while keeping them separate lets each system specialize. The decision comes down to how much your organization actually needs unified governance and reproducible pipelines versus how much it benefits from best-of-breed, purpose-built tools on each side.
Where the trade-offs actually show up
Consistency and reliability. A lakehouse adds transactional guarantees (atomic commits, isolation between concurrent writers, versioned snapshots) directly on top of the lake's files, so the same storage that used to be 'append and hope' now behaves more like a database table. A separate lake plus warehouse gets this reliability only on the warehouse side; the lake itself is still just files, so anything reading raw lake data directly inherits the lake's weaker guarantees.
Operational complexity. Two systems means two things to operate, two places for metadata to drift apart, and an ETL (Extract, Transform, Load) or ELT (Extract, Load, Transform) layer whose only job is keeping them in sync. A lakehouse removes that sync step, but it shifts the operational burden onto managing one more sophisticated system well: table maintenance, metadata scaling, and query-engine tuning become your responsibility (or your platform vendor's) instead of being split across two mature, narrower products.
Cost. Object storage underneath a lakehouse is cheap, and compute is decoupled from it, so storage cost stays low even as history accumulates. A separate warehouse usually costs more per byte stored because it's optimized for query performance, not just cheap persistence. Whether that matters depends on how much of your data is 'hot' (queried constantly, where warehouse performance pays for itself) versus 'cold' (rarely touched, where cheap lake storage wins).
Tooling and team skills. A managed warehouse's ecosystem (business intelligence, or BI, connectors, workload management, query optimizer) is mature and requires less specialized tuning. A lakehouse built on open table formats gives you more control and avoids vendor lock-in, but your team needs to actually understand things like compaction and file layout to get warehouse-like performance out of it.
Worked example: how you'd actually decide
A useful decision framework, applied to a mid-size company weighing a lakehouse against replacing (or supplementing) an existing warehouse: start from where the trade-offs show up, not from a platform preference.
- If most of your workload is well-known BI reporting on structured data, and your team is small, a managed warehouse alone is probably the pragmatic choice: you get performance and low operational overhead for the workload you actually have.
- If you increasingly need both governed BI numbers and large-scale ML feature engineering off the same raw history, and you're willing to invest in the operational skill to run it well, a lakehouse removes the duplicate-copy, duplicate-pipeline problem that a two-system setup creates.
- A common middle ground, and the one most organizations actually land on, is a hybrid: raw and semi-structured data lives in the lake (or lakehouse bronze layer), and a smaller, highly curated warehouse (or gold layer) serves the numbers the business depends on daily. This keeps the blast radius of 'the analytics platform is down' small and contained to the curated layer.
Trade-offs and pitfalls
The biggest pitfall is picking the lakehouse for its architectural elegance without budgeting for the operational skill it actually requires: an under-tuned lakehouse (poor file sizing, no compaction discipline) can be slower and less reliable than a plain warehouse, which erases the cost advantage once you factor in the engineering time spent firefighting. The second pitfall is the opposite: keeping two systems 'because that's how we've always done it' long after the sync overhead between them has become the single largest source of data inconsistency complaints.
For an enterprise BI platform, debate lakehouse (Delta Lake or Iceberg) against a managed warehouse (Snowflake or BigQuery), but go deeper than the general trade-off: what actually changes at real enterprise scale, and why?
Sample Answer
At real enterprise scale, the general lakehouse-versus-managed-warehouse trade-off sharpens around three things specifically: how concurrency actually behaves under load, what Atomicity, Consistency, Isolation, Durability (ACID) guarantees really mean for complex, high-volume writes, and how well each side handles mixed streaming-plus-batch ingestion without extra engineering effort.
What actually changes at scale
Concurrency. At moderate scale, both a lakehouse and a managed warehouse can serve many concurrent business intelligence (BI) users acceptably. At enterprise scale, a managed warehouse's concurrency handling (workload isolation, automatic scaling of independent compute clusters) tends to be more turnkey: the vendor has already solved the noisy-neighbor problem. A lakehouse can match this, but it usually requires deliberate compute-pool separation and tuning that the team has to design and maintain, rather than getting it largely for free from the platform.
Atomicity, consistency, isolation, and durability guarantees. Open table formats provide table-level ACID guarantees, which is a real and important upgrade over plain files. At enterprise scale, though, the volume and concurrency of writers (many pipelines committing to the same tables simultaneously) stresses that guarantee harder: metadata operations that are effortless with a handful of writers can become a real bottleneck with hundreds, and this is a genuine engineering problem a lakehouse team has to actively manage. A managed warehouse's transactional model is generally simpler to reason about (its query engine and storage are one integrated system), which is part of why it's easier to operate at scale with less specialized tuning, even though it offers less flexibility for complex multi-writer merge patterns.
Mixed streaming-plus-batch ingestion. A lakehouse's storage model is a natural fit for combining continuous streaming writes with periodic large batch loads into the same tables, because both are just writers committing to the same underlying table format. Managed warehouses have added streaming ingestion paths as well, but historically their strength was batch-oriented loading, so mixing a high-volume continuous stream with large batch jobs against the same warehouse tables is more likely to need careful workload management to avoid one interfering with the other.
Worked example
Consider an enterprise ingesting both a continuous stream of transaction events and nightly batch corrections from a legacy system into the same customer-activity table, served to hundreds of concurrent BI analysts. On a lakehouse, this is architecturally natural (both are writers against an ACID table), but the team needs mature compaction and metadata management to keep query performance from degrading as writer volume grows. On a managed warehouse, the batch and streaming paths might need to be more explicitly separated and reconciled, but the query-serving side to hundreds of concurrent analysts is more likely to just work at that scale without as much bespoke tuning.
Trade-offs and pitfalls
The pitfall at this scale is picking a side based on the same general trade-offs that applied at moderate scale, and being surprised when metadata scaling, writer concurrency, or workload isolation becomes the actual bottleneck rather than storage cost or basic query speed. Enterprise-scale lakehouse deployments succeed when the team genuinely invests in the operational discipline (compaction schedules, metadata monitoring, workload-isolated compute) the pattern requires; they struggle when it's adopted purely for the cost story without that investment.
Explain schema-on-write versus schema-on-read. What do you gain and give up with each, and how does the choice affect data quality, query performance, and how quickly a team can start exploring new data?
Sample Answer
Schema-on-write means you define and enforce a schema before data is loaded; anything that doesn't fit gets rejected or transformed at load time. Schema-on-read means you store the data as-is and only apply structure when a query actually reads it. The trade-off is agility and ingestion speed versus upfront quality guarantees.
What you gain and give up
| Schema-on-write | Schema-on-read | |
|---|---|---|
| Data quality | Enforced at load; bad records rejected early | Enforced (or not) at query time; bad records can slip through unnoticed until someone queries them |
| Query performance | Fast, predictable; data is already structured and often indexed | Slower unless the engine and file layout are well-tuned; structure is inferred or parsed on the fly |
| Speed of exploring new data | Slow: a new source needs a schema designed and an ETL (Extract, Transform, Load) job built before anyone can query it | Fast: land the data and start querying, even before anyone has agreed on its final shape |
| Responsibility for validation | Shared upfront, by whoever builds the load pipeline | Pushed to whoever writes the query, unless a curated layer exists |
Worked example
Say a new upstream system starts sending event data tomorrow, and nobody has fully agreed on its final field list yet. Under schema-on-write, you'd have to design a table schema, build and test a load job, and only then let anyone query it: useful once it's done, but it blocks any exploration until that's finished. Under schema-on-read, you land the raw events immediately and let an analyst start poking at them the same day, at the cost of not knowing yet whether every record is well-formed.
In practice, the two aren't mutually exclusive within one platform. A common pattern is to apply schema-on-read at ingestion (land raw data immediately, so nothing blocks exploration) and then promote a schema-on-write, validated version of the same data for anything the business depends on daily. That gives you the ingestion speed of one model and the quality guarantee of the other, on the same underlying data, at different points in its lifecycle.
Trade-offs and pitfalls
The most common mistake is picking one model as a blanket policy for an entire platform instead of matching it to the actual use case: forcing every new source through a heavyweight schema-on-write pipeline slows down legitimate exploration, while leaving everything permanently schema-on-read (never promoting anything to a validated layer) means business-critical reports are only as reliable as whatever query someone happened to write. The second pitfall is assuming schema-on-read has no cost: without a curated layer or documented conventions, different analysts querying the same raw data can apply subtly different parsing logic and land on different numbers for what should be the same metric.
Unlock Full Question Bank
Get access to all 10 Data Warehousing and Data Lakes interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.