Interview's MateData Engineer
Interview's Mate

Data Engineer

SQL · Spark · Lakehouse · Streaming

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Data Engineer topics
Lesson 99/ 160
05. Data Lakehouses & Open Table Formats

Migrating Legacy Data Lakes & Warehouses to Lakehouse Architecture

Plan phased migrations from Hive lakes or classic warehouses onto open table formats.

AdvancedMigration · Dual-Run · Cutover3 quiz questions
Practice Generative AI Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

Schemas, consumers, SLAs, and table/job dependencies. Next, format, catalog, grants, and maintenance jobs. Finally, consumer cohort, rollback window, source retirement.

Think of it like…

Migration is replacing a railway bridge while trains keep running: build the new span, send empty and then shadow trains across, compare arrivals, and only later retire the old track.

Where you’ve seen it

Copy orders into an Iceberg table at snapshot S, run 14 days of the legacy and new daily model with deterministic row/hash totals, switch one analyst catalog alias, then archive the Hive source after the hold period.

Words you’ll hear

Migration
A phased architecture change rather than a one-time copy, including contracts, data, consumers, operations, and rollback.
Dual-Run
Running old and new paths over the same logical input window so output differences are detectable before cutover.
Cutover
The irreversible point where consumers and writers use the new table and old write paths are disabled with an evidence period.
Operational boundary
A bulk copy with no row hashes creates unprovable parity, table paths and jobs can be cut over before BI semantics match, and deleting the source catalog too early loses a fallback window. Group tables by dependency and risk, benchmark in shadow mode, reconcile counts/hashes/aggregates, dual-run critical jobs, migrate consumers with compatible views, and define a rollback deadline before source retirement.

Visual diagram

Loading interactive diagram

Theory & deep dive

Migration: the working mechanism

Lakehouse migration moves legacy warehouse or Hive workloads through inventory, schema/table conversion, backfill, dual-read/dual-write validation, and a controlled cutover with rollback evidence.

Schemas, consumers, SLAs, and table/job dependencies. Format, catalog, grants, and maintenance jobs, then counts, hashes, nulls, and business aggregates; this exposes the state governed by Cutover.

Migrating Legacy Data Lakes & Warehouses to Lakehouse Architecture in one concrete design

Copy orders into an Iceberg table at snapshot S, run 14 days of the legacy and new daily model with deterministic row/hash totals, switch one analyst catalog alias, then archive the Hive source after the hold period.

Key takeaway: Lakehouse migration moves legacy warehouse or Hive workloads through inventory, schema/table conversion, backfill, dual-read/dual-write validation, and a controlled cutover with rollback evidence

Migrating Legacy Data Lakes & Warehouses to Lakehouse Architecture: failure mode and production response

A bulk copy with no row hashes creates unprovable parity, table paths and jobs can be cut over before BI semantics match, and deleting the source catalog too early loses a fallback window.

Group tables by dependency and risk, benchmark in shadow mode, reconcile counts/hashes/aggregates, dual-run critical jobs, migrate consumers with compatible views, and define a rollback deadline before source retirement. Track Parity checks as "row counts, key hashes, schema diff, and KPI totals", and make Shadow window visible to the dataset owner.

Key takeaway: Group tables by dependency and risk, benchmark in shadow mode, reconcile counts/hashes/aggregates, dual-run critical jobs, migrate consumers with compatible views, and define a rollback deadline before source retirement.

How it works, step by step

Step 1 of 4
Migration

1. Discover

Schemas, consumers, SLAs, and table/job dependencies. Lakehouse migration moves legacy warehouse or Hive workloads through inventory, schema/table conversion, backfill, dual-read/dual-write validation, and a controlled cutover with rollback evidence.

schemas, consumers, SLAs, and table/job dependencies
Key numbers at this step
Parity checks
row counts, key hashes, schema diff, and KPI totals
Dual-Run
Running old and new paths over the same logical input window so output differences are detectable before cutover.

When to use it & trade-offs

What it is

Lakehouse migration moves legacy warehouse or Hive workloads through inventory, schema/table conversion, backfill, dual-read/dual-write validation, and a controlled cutover with rollback evidence. Copy orders into an Iceberg table at snapshot S, run 14 days of the legacy and new daily model with deterministic row/hash totals, switch one analyst catalog alias, then archive the Hive source after the hold period.

Why it matters: A bulk copy with no row hashes creates unprovable parity, table paths and jobs can be cut over before BI semantics match, and deleting the source catalog too early loses a fallback window. Group tables by dependency and risk, benchmark in shadow mode, reconcile counts/hashes/aggregates, dual-run critical jobs, migrate consumers with compatible views, and define a rollback deadline before source retirement.

When to reach for it

  • Plan phased migrations from Hive lakes or classic warehouses onto open table formats.
  • Choose Migration because it provides this capability: A phased architecture change rather than a one-time copy, including contracts, data, consumers, operations, and rollback.
  • Keep evidence for Parity checks at "row counts, key hashes, schema diff, and KPI totals" so the last production stage-Dual-run/cutover - consumer cohort, rollback window, source retirement-remains testable.

When to avoid or be careful

  • A bulk copy with no row hashes creates unprovable parity, table paths and jobs can be cut over before BI semantics match, and deleting the source catalog too early loses a fallback window.
  • Do not conflate Dual-Run with Migration. The second concept contributes different behavior: Running old and new paths over the same logical input window so output differences are detectable before cutover.
  • Release only after this guardrail is in place: Group tables by dependency and risk, benchmark in shadow mode, reconcile counts/hashes/aggregates, dual-run critical jobs, migrate consumers with compatible views, and define a rollback deadline before source retirement.

Migration / Dual-Run / Cutover - roles, limits, and operating cost

Migration
Best for: A phased architecture change rather than a one-time copy, including contracts, data, consumers, operations, and rollback.

Strengths: A phased architecture change rather than a one-time copy, including contracts, data, consumers, operations, and rollback. Lakehouse migration moves legacy warehouse or Hive workloads through inventory, schema/table conversion, backfill, dual-read/dual-write validation, and a controlled cutover with rollback evidence.

Watch out: A bulk copy with no row hashes creates unprovable parity, table paths and jobs can be cut over before BI semantics match, and deleting the source catalog too early loses a fallback window.

Dual-Run
Best for: Running old and new paths over the same logical input window so output differences are detectable before cutover.

Strengths: Running old and new paths over the same logical input window so output differences are detectable before cutover. In this workflow it supports: Backfill/validate - counts, hashes, nulls, and business aggregates.

Watch out: The operating cost is real: representative days including month-end/retry cases.

Cutover
Best for: The irreversible point where consumers and writers use the new table and old write paths are disabled with an evidence period.

Strengths: The irreversible point where consumers and writers use the new table and old write paths are disabled with an evidence period. Its output can be checked with Rollback window.

Watch out: Operating guardrail: Group tables by dependency and risk, benchmark in shadow mode, reconcile counts/hashes/aggregates, dual-run critical jobs, migrate consumers with compatible views, and define a rollback deadline before source retirement.

Interview signals & numbers to know

When this topic comes up

  • “Where is the failure boundary for Migration, and how would Parity checks reveal it?”
  • “Why is Dual-Run distinct from this behavior: the irreversible point where consumers and writers use the new table and old write paths are disabled with an evidence period?”
  • Production clue: A bulk copy with no row hashes creates unprovable parity, table paths and jobs can be cut over before BI semantics match, and deleting the source catalog too early loses a fallback window.
  • Design probe: Group tables by dependency and risk, benchmark in shadow mode, reconcile counts/hashes/aggregates, dual-run critical jobs, migrate consumers with compatible views, and define a rollback deadline before source retirement.

Benchmarks & rules of thumb

Parity checks -
row counts, key hashes, schema diff, and KPI totals
Shadow window -
representative days including month-end/retry cases
Rollback window -
source remains available until product owners sign off

Common mistakes & follow-ups

Common interview mistakes

  • A bulk copy with no row hashes creates unprovable parity, table paths and jobs can be cut over before BI semantics match, and deleting the source catalog too early loses a fallback window.
  • Reporting success from a job exit code without checking Parity checks and Shadow window.
  • Treating this example as complete without replay, rollback, or access boundaries: Copy orders into an Iceberg table at snapshot S, run 14 days of the legacy and new daily model with deterministic row/hash totals, switch one analyst catalog alias, then archive the Hive source after the hold period.

Likely interviewer follow-ups

  • How would you prove this contract instead of only checking that the command ran: A phased architecture change rather than a one-time copy, including contracts, data, consumers, operations, and rollback.
  • What does the recovery plan do when this occurs? A bulk copy with no row hashes creates unprovable parity, table paths and jobs can be cut over before BI semantics match, and deleting the source catalog too early loses a fallback window.
  • When is Migration insufficient for Shadow window, and what does adding Dual-Run cost in Parity checks?
Interview tip: Lead with the data path and failure boundary: Lakehouse migration moves legacy warehouse or Hive workloads through inventory, schema/table conversion, backfill, dual-read/dual-write validation, and a controlled cutover with rollback evidence. Then make the answer operational: Group tables by dependency and risk, benchmark in shadow mode, reconcile counts/hashes/aggregates, dual-run critical jobs, migrate consumers with compatible views, and define a rollback deadline before source retirement.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Migrating Legacy Data Lakes & Warehouses to Lakehouse Architecture with data engineer interview Q&A and hands-on practice.

Open Data Engineer Q&A →Machine Learning Q&A
Previous topic
Lakehouse Security (Row-Level Filtering, Column Masking, Fine-Grained ACLs)
Next topic
Building an End-to-End Medallion Lakehouse Pipeline