Worked design: legacy (Teradata / Ab Initio) to cloud migration
Pair this with the behavioral side: telling a migration story.
Legacy (Teradata / Ab Initio) to cloud migration
A bank runs 1,800 Ab Initio graphs and 6,000 Teradata SQL scripts that feed regulatory reports, finance and 400 BI dashboards. The Teradata contract ends in 18 months. Leadership has chosen a cloud warehouse plus dbt and an orchestrator.
Plan the migration: how you scope it, what moves first, how you prove the new system produces the same numbers, how you cut over, and what can derail it.
Hint 1
Not everything should move. How do you find out what's actually used?
Hint 2
Same numbers has to be checked automatically, every day, for weeks. How?
Show solution
Inventory and cut: collect lineage and usage from query logs, scheduler metadata and job definitions. Map every job to its consumers, and retire what nobody reads. Typically a large share of legacy jobs are dead or duplicated.
Plan by domain, not by technology: migrate whole data products (for example deposits → finance reports) in waves, so each wave can be validated and cut over independently. Start with a valuable but non-regulatory domain to build the patterns (ingestion templates, dbt conventions, the testing harness), then do regulatory reports when the process is proven.
Translate, don't lift-and-shift blindly: automated SQL dialect conversion for the bulk, hand-rewrite of complex graphs, and a catalog of semantic differences (NULL handling, date/time zones, rounding, collation, implicit casts).
Prove parity: run old and new in parallel. A comparison harness checks row counts, key-level diffs and aggregates within tolerances every day, with every difference triaged. Cut over a domain only after N clean days, with sign-off from the data owners and a rollback plan. Decommission jobs as they are cut over.
Risks: scope creep ("while we're at it…"), hidden consumers (extracts, spreadsheets), key people leaving, regulators, and the deadline. Track burn-down per domain against the contract date.
What a strong answer covers
- Inventory with usage/lineage to retire unused jobs before migrating (weight 3)
- Sequences by business domain in waves, starting with a lower-risk domain to build patterns (weight 2)
- Automated parallel-run comparison with tolerances and triage before each cutover (weight 3)
- Handles dialect and semantic differences (NULLs, time zones, rounding, casts) (weight 2)
- Cutover with sign-off, rollback and decommissioning; risks and deadline tracking (weight 2)
Follow-ups
- Halfway through, the parallel run shows a 0.02% difference in a regulatory total. What do you do?
Stop and investigate before going further: reproduce it, trace the difference down to the rows (rounding, NULL handling, timezone or sort-order differences are typical), and fix the new pipeline. For a regulatory total, explain and sign off any accepted difference with the business owner. Don't hide it.
- How do you keep business teams from adding new jobs to the legacy system during the migration?
Freeze the legacy system: new jobs need an approval, and the migration team offers to build new work directly in the cloud platform. Make the new platform the easier path, with templates and support, and track legacy changes so they can be added to the migration scope.
1. Requirements
- Scope: 1,800 ETL graphs, 6,000 SQL scripts, regulatory reports, finance, 400 dashboards.
- Deadline: 18 months (the contract end), with a buffer for regulatory sign-off.
- Target: a cloud warehouse, dbt for transformations and an orchestrator.
- Non-negotiable: regulatory numbers must match, or every difference must be explained and approved.
2. Data contracts
Each migrated data product gets an owner and a contract: outputs, freshness and the reconciliation rules that define "the same". The definition of done for a domain is agreed before work starts.
3. Ingestion
Source systems (core banking, cards and so on) are re-pointed to land in the cloud: CDC or batch extracts into a raw zone. During the parallel run, both platforms receive the same inputs. Otherwise differences can't be attributed.
4. Storage and format
Raw → staging → modeled layers in the warehouse, built with dbt. Keep the legacy table names available as compatibility views during transition, so BI tools and extracts can switch over with minimal change.
5. Transform: translate, don't copy blindly
- Inventory: parse job definitions, scheduler metadata and query logs to build lineage and usage. Expect a large share of jobs to be dead (no readers), duplicated or superseded. Retiring them is the cheapest migration.
- Automated SQL translation for the bulk (dialect converters handle syntax). Rewrite complex ETL graphs by hand as dbt models, simplifying where the original logic grew by accretion.
- A catalog of semantic differences, tested explicitly:
- NULL handling and empty strings
- date/time types and time zones
- decimal precision and rounding
- string collation and case sensitivity
- implicit casts and integer division
6. Serving
Dashboards move in waves after their sources are validated. Communicate with each consumer group: what changes for them, when, and who to call.
7. Quality: the parity harness
The core of the plan. For every migrated output, a daily automated comparison during a parallel-run period:
- row counts per partition
- key-level diffs (rows only on one side; rows with different values)
- aggregates of key measures within agreed tolerances (exact for regulatory totals)
- a triage queue: each difference is fixed, or explained and accepted by the data owner
Cut over a domain only after N consecutive clean days and owner sign-off.
8. Orchestration and backfill
The orchestrator runs the new pipelines in parallel with legacy schedules. History is migrated once (bulk export/import) and reconciled with the same harness. Freeze the legacy system for new development early, or the target keeps moving.
9. Failure modes
| Risk | Mitigation |
|---|---|
| Hidden consumers (extracts, spreadsheets, partner feeds) | Query-log usage analysis; compatibility views; announcements |
| Scope creep ("redesign while we're at it") | Separate migration from improvement; improvements after cutover |
| Unexplained small differences in regulatory numbers | Exact-match rules for regulatory outputs; triage with owners; never "close enough" |
| Key legacy experts leave | Document as you go; pair them with the migration team early |
| Deadline slip | Burn-down per domain; cut scope (retire) before cutting validation |
10. Cost
Two platforms run in parallel for months, so shorten the overlap per domain by cutting over in waves and decommissioning as you go. Cloud cost during the parallel run is predictable; plan it in the budget.
11. What changes at 10×
With ten times the jobs, the plan becomes a factory: automated inventory, translation, test generation and the parity harness as shared tooling, with several teams migrating domains in parallel under one standard.