W44 Architecture decision-making — design & defend your capstone M32 · Phase 4 · launch G9G1 ~10h
- Write a one-page capstone project charter that names the problem, the decision-making persona, the data-product grain, and 3 measurable KPIs — such that a reviewer can restate the business problem in one sentence without reading the code.
- Produce a 4-part architecture document (context/C4-lite, medallion data flow with grain per layer, governance & security model, deployment/CI-CD topology) that a senior reviewer can trace end-to-end from source to golden record.
- Author 3 Architecture Decision Records (ADRs) for pivotal choices (e.g., batch vs streaming, star vs Data Vault, exact vs fuzzy matching) that each state the context, the options considered, what was given up, and the revisit trigger.
- Validate the chosen real public source by profiling it (volume, refresh cadence, messiness, licence/ToS) and defending in writing why it is rich enough to reach golden records.
- Defend the design verbally in a trade-off shape (‘I chose X over Y because Z, which cost me A, and I would revisit via B’) tied to a named persona, not a tool.
- Design before code: why the charter comes first (‘slow on the front end, fast on the back end’). Grain, persona, and KPI as the three things that make a data product defensible. Recognition before evaluation — the 1–2 sentence business framing that opens every artifact. (0.75 hr)
- The 4-part architecture doc as a senior signal: (1) context/C4-lite system diagram, (2) medallion data flow with the declared grain at bronze/silver/gold, (3) Unity Catalog governance & security model, (4) DABs/CI-CD deployment topology. What a 30-second GitHub skim must reveal. (1.0 hr)
- Architecture Decision Records: the Nygard format (context → decision → status → consequences). Writing the option you REJECTED as carefully as the one you chose; the ‘what I gave up’ and the ‘revisit trigger’ as interview gold. (1.0 hr)
- The three pivotal capstone decisions in depth: batch vs micro-batch/streaming; dimensional star vs Data Vault vs one-big-table; exact vs fuzzy (blocking + similarity) entity matching for MDM. Cost, latency, and maintainability trade-offs of each. (0.75 hr)
- Source selection & feasibility: profiling a real public source for volume, refresh cadence, natural keys, duplication/messiness, and licence/ToS before you commit 6 weeks to it. Red flags that kill a capstone source. (0.5 hr)
Hands-on lab · ~6h
A pure design-before-code week: you stand up your capstone repository skeleton and fill it with decision artifacts — a project charter, a 4-part architecture document, and 3 ADRs — anchored to a real, profiled public source in your own target industry. No pipeline code ships this week; the deliverable is a defensible design a reviewer can trace from source to golden record. You are proving a human made judgment calls and wrote down why.
- Pick your industry and shortlist 2 candidate real public sources (from data.gov, SEC EDGAR, CoinGecko, ReliefWeb, NOAA, CMS/HealthData.gov, or Faker for locked-down/fraud domains). For each, open the actual portal and note volume, refresh cadence, format, and licence/ToS.
- Profile your top candidate for 30–60 min: pull a sample, count rows, inspect natural keys, spot duplicates/nulls/format drift, and confirm it is messy enough and rich enough to reach golden records. Write a 5-line ‘source feasibility’ note and commit the sample profile.
- Scaffold the capstone repo from the starter template: create /docs (charter.md, architecture.md), /docs/adr (0001–0003), /src, /tests, /resources placeholders, and a README stub. Do NOT write pipeline code — leave TODO markers.
- Write charter.md: 1–2 sentence business framing, the problem, the named decision-making persona, the data-product grain (one row = ?), and 3 measurable KPIs the product moves. Restate the problem in one sentence at the top.
- Write architecture.md Part 1 (context/C4-lite diagram: source → Databricks → consumer) and Part 2 (medallion data flow) — declare the explicit grain at bronze, silver, and gold, and where CDC/idempotency and quarantine live.
- Write architecture.md Part 3 (Unity Catalog governance: catalogs/schemas, ownership, access grants, PII handling) and Part 4 (deployment: DABs bundle layout, CI-CD stages, environments).
- Author 3 ADRs using the template — one each for a batch-vs-streaming choice, a modeling choice (star vs Data Vault vs OBT), and a matching choice (exact vs fuzzy). In each, record options considered, the decision, what you gave up, and the revisit trigger.
- Do a ‘30-second skim’ self-audit: open only the README + top of each doc and check a stranger could name the problem, the grain, and the 3 decisions. Fix anything that fails the skim.
- Record a 3–5 minute Loom walking a reviewer through the charter and one ADR in trade-off shape (‘I chose X over Y because Z, which cost me A, I’d revisit via B’), tying the decision to your persona. Commit and push everything with a clean history.
- Michael Nygard — Documenting Architecture Decisions (the original ADR post)
- adr.github.io — Architecture Decision Records (templates & tooling)
- Databricks Well-Architected Lakehouse framework
- The C4 model for visualising software architecture (context/container diagrams)
- Databricks Asset Bundles (DABs) — project structure & deployment
- Data Vault vs. dimensional (star) modeling — trade-offs overview
- Unity Catalog — governance model for the lakehouse
</> Starter scaffold — docs/adr/0001-batch-vs-streaming.md markdown
# ADR 0001: <TODO short decision title, e.g. Batch vs. streaming ingestion>
- Status: Proposed <!-- TODO: Proposed | Accepted | Superseded by ADR-#### -->
- Date: 2026-09-23
- Deciders: <TODO your name>
- Persona affected: <TODO the named decision-maker this serves, NOT a tool>
## Context
<!-- TODO: 3-5 sentences. What business/technical forces make this decision necessary?
Tie it to the persona and a KPI from the charter. Recognition before evaluation. -->
## Options considered
### Option A — <TODO name>
- Pros: <TODO>
- Cons: <TODO>
### Option B — <TODO name> (the one you will REJECT — write it just as carefully)
- Pros: <TODO>
- Cons: <TODO>
### Option C — <TODO optional third>
- <TODO or delete>
## Decision
<!-- TODO: One sentence in trade-off shape:
"I chose X over Y because Z." -->
## Consequences
- What this costs me (A): <TODO the price you knowingly pay>
- What I gave up: <TODO the capability the rejected option would have given>
- Revisit trigger (B): <TODO the concrete signal/metric that would make me reopen this>
## Links
- Charter: ../charter.md
- Architecture: ../architecture.md#<TODO section>
- Most Dangerous Data Architecture Decisions (Ranked)
- The $50K Pipeline Mistake Every Data Engineer Makes
- The Question Every Engineer Should Ask Before Coding
- Designing Data-Intensive Applications, 2nd Ed. O'Reilly · Book
- Fundamentals of Data Engineering O'Reilly · Book
Deliverable, acceptance & live session
- PASS if a senior reviewer doing a 30-second skim can, from the README and doc headers alone, restate the business problem in one sentence, name the data-product grain (one row = ?), and identify the 3 pivotal decisions. Each ADR must state the option NOT chosen and a concrete revisit trigger — an ADR that only justifies the winner fails. The architecture doc must trace unbroken from the real source to a gold-layer golden record, with grain declared at bronze/silver/gold and quarantine/idempotency located. The source-feasibility note must cite actual volume, cadence, and licence/ToS. FAIL if the source is not real/profiled, if any decision is tied to a tool instead of a person, or if the walkthrough sounds too-rehearsed rather than explainable.
Recap Open by projecting your charter and having a peer read it cold — can they restate your problem and grain in one sentence? Then whiteboard your 4-part architecture from source to golden record in under 3 minutes. Recap the shift from Phase 3 (executing a given design) to Phase 4 (owning the design): you are now the person who has to defend why, not just show what.
Misconception ‘A good architecture doc is the one that shows my chosen design.’ Wrong — the senior signal is the rejected option written as carefully as the winner. Learners default to justifying their pick and hand-wave the alternatives, which reads as never having considered them. An ADR without a real ‘what I gave up’ and a concrete revisit trigger is a decision you can’t defend when an interviewer pushes. Also common: choosing streaming/Data Vault/fuzzy matching because they sound advanced rather than because a named persona needs them.
Hot seat "Each learner is put on the spot: ‘Defend your hardest ADR in trade-off shape — I chose X over Y because Z, which cost me A, and I’d revisit via B — and tie it to the person who cares, not the tool.’ The room then plays skeptical senior: ‘Why not the option you rejected?’ and ‘What signal would make you tear this up?’ You pass the seat only if your answer is explainable and un-rehearsed, not perfect — you do not need perfect decisions, you need decisions you can defend."
W45 Elective deep-dive — Data Vault 2.0 OR AI-assisted DE (choose one) M12 / M33 · Phase 4 · launch G2 ~16.5h
- Given your capstone model, DECIDE between two advanced capabilities and write a 1-paragraph rationale tying the choice to a real reader (hiring manager, future maintainer) — not to novelty.
- TRACK A: Model a subject area of your capstone as Data Vault 2.0 (hub / link / satellite), define hash keys and load-date/record-source columns, and explain in writing exactly WHEN Data Vault beats a star schema and what auditability/agility you buy for the added join cost.
- TRACK B: Wire ONE narrowly-scoped LLM step into a Databricks pipeline (classify / extract / standardize) behind a deterministic contract, with a semantic/context layer, input+output guardrails, and a repeatable eval harness with a measured pass rate.
- For EITHER track, produce an ADR that states the trade-off in interview-ready form: 'I chose X over Y because Z, which cost me A, and I would revisit via B.'
- Prove the human-in-the-loop: show at least one decision point where YOU overrode or bounded the tool, and record why over-engineering the other track would have been the wrong call this week.
- Why an elective, and how to choose (0.5 hr): 'add one advanced capability, not five.' Over-engineering is the trap this week is designed to expose. Read the two track summaries, then write your choice + reader-first rationale BEFORE any code (recognition before evaluation).
- TRACK A concepts — Data Vault 2.0 core (2.0 hr): hubs (business keys), links (relationships/transactions), satellites (context + history), hash keys vs. sequence keys, load_date and record_source as first-class lineage, insert-only/idempotent loads. Where it sits relative to your medallion: raw vault in silver, business vault + star-schema marts in gold.
- TRACK A concepts — when Data Vault beats a star (1.0 hr): many source systems, changing relationships, hard auditability/regulatory lineage, parallel loads. The cost: more joins, more objects, a mart layer still needed for consumers. Star schema remains right for a single stable source and BI-first grain. Decide with your capstone in hand.
- TRACK B concepts — LLMs/agents in the pipeline (2.0 hr): the ONLY safe pattern is a narrow, bounded step behind a deterministic contract (typed output, allowed-value set). Semantic/context layer = the curated facts + schema + business glossary you feed the model so it answers about YOUR data, not the internet. Cost, latency, and non-determinism as engineering constraints.
- TRACK B concepts — guardrails, evals, human-in-the-loop (1.5 hr): input validation + output schema enforcement + confidence/abstain path + quarantine on low confidence (same quarantine discipline as Phases 1-3). Build a labeled gold set, measure pass rate/precision, and log every call for audit. 'The human in the loop' = you own the eval bar and the override.
- Both tracks — interview framing (0.5 hr): how to tell this as a trade-off story ('why not what'), and why 'I deliberately did NOT do X' is a senior signal on a 30-second skim.
Hands-on lab · ~9h
A mini-project in your chosen track, applied to the capstone where possible. TRACK A: re-model one subject area of your capstone (or Project 1) as a Data Vault 2.0 raw vault — hubs, links, satellites with hash keys and lineage columns — load it idempotently in Databricks, then build a small star-schema mart on top and write the ADR on when this earns its keep. TRACK B: add one bounded LLM step to your capstone's bronze/silver flow (e.g., standardize messy free-text categories, extract fields from unstructured source, or classify records), wrap it in a semantic/context layer plus input/output guardrails and a quarantine-on-low-confidence path, then build and run an eval harness against a hand-labeled gold set and report the pass rate. Both tracks end with the same deliverables: working code, an ADR, and a documented human-in-the-loop override.
- CHOOSE (both tracks): In your capstone repo, create docs/adr/ADR-00X-elective.md. Write your track choice and a reader-first rationale (2-4 sentences). State what you are deliberately NOT building this week and why (over-engineering guard). Commit before writing any code.
- TRACK A — Step 1: Pick ONE subject area from your capstone/Project-1 silver model (e.g., provider–payer–price, or customer–order–product). Sketch the vault on paper: identify business keys (hubs), relationships/transactions (links), and descriptive/historical attributes (satellites). Save the sketch as an image in docs/.
- TRACK A — Step 2: In a Databricks notebook, build the hub tables: compute a deterministic hash key over the business key, add load_date and record_source. Load insert-only and idempotent (re-running adds no duplicates). Repeat for link tables (hash of the parent business keys).
- TRACK A — Step 3: Build satellite tables: hash-diff the descriptive columns so only CHANGED context inserts a new row (recoverable history). Verify by loading the same batch twice and a modified batch once; confirm row counts prove idempotency + change capture.
- TRACK A — Step 4: Build a small star-schema mart (one fact + 2-3 dims) as a gold view/table ON TOP of the vault, to prove the vault still serves consumers. Then write the ADR body: when Data Vault beats a star here, the join/complexity cost, and your revisit trigger.
- TRACK B — Step 1: Pick ONE narrow, bounded task on your real source (standardize free-text categories, extract fields from unstructured text, OR classify records into an allowed set). Define a DETERMINISTIC contract: exact output schema + the closed set of allowed values. Write it down first.
- TRACK B — Step 2: Build the semantic/context layer: assemble the schema, business glossary, and allowed-value list you will inject into the prompt so the model reasons over YOUR data. Call the LLM via Databricks ai_query / an LLM API from a notebook on a small batch.
- TRACK B — Step 3: Add guardrails: validate/normalize input, enforce the output schema, and route low-confidence or off-contract responses to a QUARANTINE table (reuse your Phase 1-3 quarantine pattern) instead of silently accepting them. Log every call (input, output, confidence) for audit.
- TRACK B — Step 4: Hand-label a gold set (30-100 rows), run the eval harness (MLflow evaluate or a simple accuracy/precision script), record the pass rate, and pick ONE case where you override the model — document it. Write the ADR: why a bounded LLM step here, cost/latency/non-determinism, and your revisit trigger.
- Databricks — Data Vault best practices on the Lakehouse
- AutomateDV (dbtvault) — Data Vault 2.0 hub/link/satellite reference & hashing
- Scalefree — Data Vault 2.0 concepts (hubs, links, satellites, hash keys)
- Databricks — ai_query / AI Functions for batch LLM inference in SQL & Python
- MLflow — LLM evaluation (mlflow.evaluate) for building an eval harness
- Databricks — Unity Catalog governance for AI/model + data assets
</> Starter scaffold — elective_deep_dive_scaffold.py python
# Week 45 elective scaffold. Choose ONE track. Delete the other block.
# Deliverables for BOTH tracks: working code + ADR + documented human-in-the-loop override.
from pyspark.sql import functions as F
CATALOG = "<your_capstone_catalog>" # TODO: set
SCHEMA = "<your_schema>" # TODO: set
RECORD_SOURCE = "<source_system_name>" # TODO: e.g. 'cms_provider_data'
# ============================================================
# TRACK A — DATA VAULT 2.0 (hub / link / satellite)
# ============================================================
def hash_key(*cols):
# TODO: normalize (trim/upper/null-handling) BEFORE hashing so keys are stable.
# Standard is sha256 over business key(s) with a separator.
concatenated = F.concat_ws("||", *[F.upper(F.trim(F.col(c).cast("string"))) for c in cols])
return F.sha2(concatenated, 256)
def load_hub(src_df, business_keys, hub_table):
# Insert-only + idempotent: only NEW business keys land.
staged = (src_df
.withColumn("hub_hk", hash_key(*business_keys))
.withColumn("load_date", F.current_timestamp())
.withColumn("record_source", F.lit(RECORD_SOURCE))
.select("hub_hk", *business_keys, "load_date", "record_source")
.dropDuplicates(["hub_hk"]))
# TODO: MERGE into hub_table ON hub_hk WHEN NOT MATCHED INSERT.
# TODO: assert re-running this batch adds 0 rows (idempotency proof).
raise NotImplementedError("TODO: implement idempotent hub MERGE")
def load_satellite(src_df, hub_keys, context_cols, sat_table):
# Only insert a new row when the descriptive context CHANGED (hash-diff).
staged = (src_df
.withColumn("hub_hk", hash_key(*hub_keys))
.withColumn("hash_diff", hash_key(*context_cols))
.withColumn("load_date", F.current_timestamp())
.withColumn("record_source", F.lit(RECORD_SOURCE)))
# TODO: compare hash_diff to the latest sat row per hub_hk; insert only on change.
# TODO: prove recoverable history: load same batch twice (no new rows),
# then a modified batch once (exactly the changed rows appear).
raise NotImplementedError("TODO: implement hash-diff satellite load")
# TODO: load_link() for the relationship/transaction (hash of parent business keys).
# TODO: build a small star-schema mart (1 fact + 2-3 dims) as a gold view ON TOP.
# TODO: ADR — when Data Vault beats a star HERE, the join cost, your revisit trigger.
# ============================================================
# TRACK B — AI-ASSISTED DE (one bounded LLM step)
# ============================================================
ALLOWED_VALUES = ["<value_1>", "<value_2>", "<UNKNOWN>"] # TODO: closed set = your contract
def build_context(row):
# Semantic/context layer: inject YOUR schema + glossary + allowed values.
# TODO: return a compact prompt grounded in the row + the allowed set only.
raise NotImplementedError("TODO: assemble context-grounded prompt")
def call_llm(prompt):
# TODO: call via Databricks ai_query OR your LLM API (load Claude API skill for Anthropic).
# Return dict: {"value": ..., "confidence": ...}
raise NotImplementedError("TODO: single bounded call, typed output")
def guarded_infer(row):
result = call_llm(build_context(row))
# GUARDRAILS:
# TODO: enforce result['value'] in ALLOWED_VALUES (else route to quarantine).
# TODO: if confidence < THRESHOLD -> quarantine table, do NOT accept silently.
# TODO: log (input, output, confidence) to an audit table for lineage.
raise NotImplementedError("TODO: enforce output contract + quarantine path")
# TODO: hand-label a gold set (30-100 rows) -> gold_labels table.
# TODO: eval harness (mlflow.evaluate or accuracy/precision script); record PASS RATE.
# TODO: pick ONE case you OVERRIDE the model; document why (human-in-the-loop).
# TODO: ADR — why a bounded LLM step here; cost/latency/non-determinism; revisit trigger.
- What Senior Data Engineers Actually Use AI For
- The Four Things Your AI Agent Needs Before Production
- Senior-Engineer AI Architecture Checklist (free)
- Building a Scalable Data Warehouse with Data Vault 2.0 O'Reilly · Book
- Data Vault: An Introduction (Michael Olschimke) Udemy · Course
- Generative AI for Data Engineers Specialization (IBM) Coursera · Specialization
Deliverable, acceptance & live session
- Choice + reader-first rationale committed BEFORE code, and it names what was deliberately NOT built. TRACK A: re-loading an identical batch adds zero rows (idempotency proven), a modified batch inserts only the changed satellite rows (recoverable history proven), and a working star-schema mart reads off the vault. TRACK B: 100% of accepted outputs are within the allowed-value set, off-contract/low-confidence rows land in quarantine (none silently accepted), every call is logged for audit, and the eval harness reports a real pass rate against a hand-labeled gold set. Both: ADR states the trade-off and a concrete revisit trigger, and at least one human-in-the-loop override is documented.
Recap Each learner states in 30 seconds: which track, and the reader they chose it for. Then a rapid-fire round: name one thing you deliberately did NOT build this week and why that was the right call (not laziness).
Misconception 'More advanced = more hireable, so I should add both / the fanciest option.' The trap: over-engineering. A hiring manager reads an unnecessary Data Vault or a gratuitous LLM step as poor judgment, not sophistication. Seniority is choosing the ONE capability a real reader needs and being able to defend why you stopped there — 'you do not need perfect decisions, you need explainable ones.'
Hot seat "Trade-off drill on the chosen track. TRACK A: 'You added a Data Vault. My BI team just wants a star schema off one stable source — justify the extra joins, or tell me when you'd walk it back.' TRACK B: 'You put an LLM in a data pipeline. It's non-deterministic and costs money per row — why isn't that a liability, where's your eval bar, and where did YOU override it?' Answer in the trade-off shape: I chose X over Y because Z, which cost me A, and I would revisit via B — no too-clean, no too-rehearsed."
W46 Interview prep I — technical (SQL, pipeline & system design) M36 / M35 · Phase 4 · launch G1G10 ~11.0h
- Solve a 10-problem timed SQL set (window functions, dedup-to-grain, gap-and-island, as-of/temporal joins, anti-joins) under a 25-minute clock, narrating approach aloud, at >=8/10 correctness with the grain named for every answer.
- Whiteboard a batch + incremental medallion pipeline for a novel prompt in 20 minutes using a repeatable 6-box frame (grain -> source/CDC -> medallion -> idempotency -> quality/quarantine -> serve/govern), anchored to your own capstone as the reference implementation.
- Score a take-home submission (your own or a peer's) against a written rubric and name the 3 highest-leverage gaps plus the fix for each.
- Refactor your two-project README + architecture doc so a cold reviewer can state the grain, the two golden-record outputs, and the deployment story within a 30-second skim.
- Deliver one 2-minute spoken system-design tradeoff in the 'I chose X over Y because Z, which cost A, and I would revisit via B' shape, tied to a person (not a tool).
- The technical loop, decoded (0.5 hr): what the SQL, pipeline, and system-design rounds actually score — judgment, grain-thinking, and failure-awareness, not syntax recall. Walk the real rubric each interviewer fills in, and where a two-project portfolio lets you answer 'have you done this?' with 'yes, twice.'
- SQL under a clock (1.25 hr): a pattern catalog you can recognize on sight — ROW_NUMBER dedup-to-grain, running/lag windows, gap-and-island, as-of and SCD-2 temporal joins, anti-joins for reconciliation. The narrate-while-you-type method: state the grain, restate the ask, name the pattern, then type.
- The pipeline/system-design whiteboard (1.25 hr): the 6-box frame (grain -> source & CDC/incremental -> bronze/silver/gold -> idempotency & reprocessing -> tests/quarantine -> serve & Unity Catalog governance). How to drive the whiteboard from your capstone so every box has a real story instead of a diagram.
- Take-home like a senior (0.75 hr): reading the hidden rubric behind a prompt, scoping to a defensible thin slice, writing the decision log/ADRs that prove a human made choices, and the README that makes a graded submission read senior in 30 seconds.
- Portfolio engineering for the 30-second skim (0.75 hr): repo hygiene (structure, .gitignore, no secrets, meaningful commit history), README-as-architecture, ADRs, and the concrete diff between a tutorial repo and a data-product repo a reviewer trusts.
Hands-on lab · ~6.5h
A full technical-interview simulation run entirely on your existing two-project portfolio (Project 1 healthcare + your capstone) — no new data. You build and run timed SQL drills against your own silver/gold tables, construct and cold-run a system-design whiteboard, grade a take-home against a rubric, then harden the portfolio's README, architecture doc, and repo hygiene so it survives the 30-second skim. Output is a reusable interview-prep dossier plus a measurably cleaner repo.
- Assemble your SQL drill deck: from the 6-pattern catalog, write 10 problem PROMPTS (not solutions) that target your own silver/gold tables — e.g., 'return one row per provider per effective period' (SCD-2), 'find the longest run of days a price stayed unchanged' (gap-and-island), 'rows in bronze with no matching gold key' (anti-join). Store each with the expected grain and a one-line expected-shape assertion.
- Run three timed 25-minute SQL sets using the starter harness: solve against your real tables, speak the grain + pattern aloud before typing (record yourself), and log per-problem: solved/not, time, and where you stalled. Target >=8/10 by set three.
- Build your capstone's 6-box whiteboard one-pager: fill every box (grain, source & CDC/incremental strategy, bronze/silver/gold, idempotency & reprocessing, tests/quarantine, serve & Unity Catalog governance) with a specific fact from YOUR build, plus the golden-record output at the end.
- Cold whiteboard a NOVEL prompt in 20 minutes on the clock (use an unfamiliar public schema, e.g. NYC TLC trips): drive the same 6 boxes, then explicitly map each box back to how you solved the equivalent in your capstone. Record the audio; note where you froze.
- Grade a take-home against the rubric: take your own capstone (or a peer's) submission and score it on grain correctness, idempotency, tests/quarantine, docs/ADRs, and repo hygiene. Write the 3 highest-leverage gaps and the concrete fix for each.
- Refactor the portfolio README + architecture doc: lead with a one-line 'what data product / what grain / two golden-record outputs', embed the architecture diagram, link the 4-part architecture doc and ADRs, and add a 'skim in 30 seconds' section. Test it by having someone read for 30s and repeat it back.
- Repo hygiene pass: verify structure, .gitignore, zero secrets/credentials in history, a real commit story, pinned deps, and that the DABs/CI-CD config and tests are visible from the root. Fix anything a reviewer would flag.
- Record a 2-minute spoken tradeoff narration on one real capstone decision using the 'X over Y because Z, cost A, revisit via B' shape, tied to a named stakeholder — not too clean, not rehearsed.
- Assemble the Interview Prep I dossier: SQL scorecard, whiteboard one-pager, cold-prompt notes, graded take-home rubric, and links to the refactored README/architecture doc and the recorded tradeoff.
- DataLemur — SQL interview questions (windowing, ranking, joins) with difficulty tiers
- StrataScratch — SQL & data-project interview practice
- Designing Data-Intensive Applications (Kleppmann) — the system-design vocabulary interviewers expect
- Databricks — Lakehouse / Well-Architected best practices (grounding for the whiteboard's serve & govern boxes)
- Architecture Decision Records (ADR) — templates and rationale
- Make a README — structure and checklist for a README that reads senior
</> Starter scaffold — interview_prep/sql_drill_harness.py python
# Databricks notebook / PySpark. Timed SQL drill harness for Interview Prep I.
# Run one cell per problem. Speak grain + pattern ALOUD before you type the SQL.
import time
from dataclasses import dataclass, field
CATALOG = "TODO_your_catalog" # TODO: your Unity Catalog
SCHEMA = "TODO_your_silver_schema" # TODO: drill against SILVER, not GOLD
TIME_BUDGET_MIN = 25 # per 10-problem set
@dataclass
class Drill:
id: str
prompt: str # the ask, as an interviewer would state it
grain: str # ONE row per ____ (state before solving)
pattern: str # windowing | dedup-to-grain | gap-and-island | as-of/SCD2 | anti-join
solution_sql: str = "" # TODO: you fill this on the clock
# TODO: author 10 drills against YOUR silver tables. Keep prompts realistic;
# do NOT pre-write solution_sql — leave it empty and solve live.
DRILLS: list[Drill] = [
# Drill("D1", "Return the current effective row per provider", "one row per provider", "dedup-to-grain"),
# Drill("D2", "Longest run of days price stayed unchanged", "one row per price-run", "gap-and-island"),
# ... TODO: 8 more, covering every pattern in the catalog at least once.
]
def narrate_gate(d: Drill) -> None:
# Force the interview habit: say it before you type it.
print(f"[{d.id}] PATTERN={d.pattern} | TARGET GRAIN='{d.grain}'")
print("Say aloud now: (1) restate the ask (2) name the grain (3) name the pattern. Then type.")
# TODO: optionally record audio here for later self-review.
def assert_grain(df, key_cols: list[str]) -> None:
total = df.count()
distinct = df.select(*key_cols).distinct().count()
ok = total == distinct
print(f"GRAIN CHECK on {key_cols}: rows={total} distinct={distinct} -> {'PASS' if ok else 'FAIL'}")
# TODO: if FAIL, your query broke the grain — the #1 thing interviewers watch. Fix before moving on.
def run_drill(d: Drill, key_cols: list[str]):
narrate_gate(d)
t0 = time.time()
# TODO: write d.solution_sql live, then execute it:
# df = spark.sql(d.solution_sql.format(cat=CATALOG, sch=SCHEMA))
df = None # TODO replace
elapsed = round(time.time() - t0, 1)
print(f"[{d.id}] elapsed={elapsed}s")
# assert_grain(df, key_cols) # TODO enable once df is real
# TODO: log solved(Y/N), elapsed, and where you stalled into your scorecard.
return df
# scorecard: append one row per attempt across your 3 timed sets.
SCORECARD: list[dict] = [] # TODO: {id, set, solved, seconds, stall_note}
# TODO: after 3 sets, compute solved-rate and median time; target >=8/10 by set 3.
- The Senior Engineer Interview Question Exposing Impostors
- Your Portfolio Project Is Getting You Rejected!
- Cracking the Data Engineering Interview O'Reilly · Book
- Practicing Coding Interview Questions in Python DataCamp · Course
Deliverable, acceptance & live session
- SQL: three timed sets logged, reaching >=8/10 correct with the grain named and grain-asserted for every answer by set three. Whiteboard: all 6 boxes filled from real capstone facts, ending on golden records, and a novel-prompt run completed inside 20 minutes on the clock. Take-home: rubric scored across grain/idempotency/tests-quarantine/docs-ADRs/hygiene with 3 highest-leverage gaps and concrete fixes written. Portfolio: a cold reader repeats back grain + two golden-record outputs + deployment story after a 30-second skim
- Repo has no secrets in history, a real commit story, and visible tests + DABs/CI-CD from root. Communication: the 2-minute tradeoff is tied to a named person, states the cost, and names how you'd revisit it — not too clean, not rehearsed.
Recap Learners run a 5-minute live SQL race on a shared novel schema (screen-shared, narrating grain before typing), then two volunteers whiteboard their capstone's 6 boxes in 8 minutes each while peers score against the rubric. Recap surfaces the pattern nobody could name on sight and the box everyone hand-waved (usually idempotency/reprocessing).
Misconception 'The technical round tests whether I can recall syntax / solve the hardest LeetCode.' Correct it: the interviewer is scoring whether you protect the grain, reason about failure and reprocessing, and can explain WHY. A candidate who states the grain, names the pattern, and writes a correct medium query while narrating beats one who silently speed-solves a hard one and mangles the grain. You do not need perfect decisions, you need explainable ones.
Hot seat "Cold call: 'Here's a table you've never seen (shared on screen). In 90 seconds, tell me the grain you'd enforce and the one SQL pattern you'd reach for — then, without writing full code, walk the 6 boxes of a pipeline that lands it as a governed gold table. Now: which of those 6 boxes is weakest in YOUR capstone, and what would you do about it?'"
W47 Interview prep II — behavioral, storytelling & the recorded walkthrough M36 / M34 · Phase 4 · launch G10G1 ~11h
- Deliver a 5–8 minute recorded portfolio walkthrough (Project 1 healthcare → capstone industry) that lands the two-project story and ends on golden records, with every design choice tied to a named person or role, not a tool.
- Reconstruct any decision from your two projects into the trade-off shape ('I chose X over Y because Z, which cost me A, and I would revisit via B') and the failure-story shape (scene → what you SAW → diagnosis in order → fix + one lesson) on demand, without notes.
- Answer 'why not what' under pressure: given a component of your pipeline, state the business consequence of getting it wrong before naming the technology, in under 90 seconds.
- Pass a timed AI-screen round (Micro1/HireVue format: fixed prompt, 30s think, 2–3 min answer, no re-record) on 4 of 5 standard behavioral prompts, scored against a rubric.
- Defend your own architecture in a live hot seat: field three adversarial 'why didn't you just…' challenges and convert at least one into an explicit, costed trade-off rather than a defense.
- Communication as the senior signal (0.75 hr): why interviewers screen for judgment, not syntax; the 'why not what' reframe; the rule that every decision must resolve to a PERSON (the analyst who gets a wrong price, the on-call engineer paged at 3am, the compliance owner), never a tool. Watch: how a mid answer ('I used Auto Loader') becomes a senior answer ('the finance analyst was reconciling stale prices, so I needed incremental ingest that couldn't silently drop a file').
- The two answer shapes, drilled (1.0 hr): the FAILURE-STORY shape (set the scene → what you SAW in the data/logs → diagnosis IN ORDER → the fix + one lesson) and the TRADE-OFF shape ('I chose X over Y because Z, which cost me A, and I would revisit via B'). Why 'too clean' and 'too rehearsed' both read as junior; how a real cost (A) and a real revisit path (B) signal seniority. Mining your own ADRs and quarantine logs for material.
- Behavioral frameworks and the AI-screen format (0.75 hr): STAR vs. the failure/trade-off shapes and when each wins; the mechanics of Micro1/HireVue/async video screens (fixed prompt, countdown, one take, no interviewer to read the room); pacing for a camera; the five evergreen prompts (conflict, ambiguity, failure, data-quality catch, a decision you'd redo).
- Anatomy of a senior 5–8 minute walkthrough (1.0 hr): structure = 30s business framing → 60s architecture (the 4-part doc, grain, one ADR) → 3–4 min the demo path bronze→silver→gold→golden record, narrating ONE quality/idempotency decision live → 60s the second project as proof it's a repeatable method, not a one-off → close on ownership. What a 30-second GitHub skim must already show before you speak. Recording hygiene: audio first, screen legible, no dead air.
- Defend-your-design without getting defensive (0.5 hr): converting 'why didn't you just use a view / skip MDM / use Postgres' into a costed trade-off instead of a wall; the phrase 'that's the right question — here's what it would have cost'; admitting the one thing you'd revisit as a strength, not a confession ('you do not need perfect decisions, you need explainable ones').
Hands-on lab · ~7h
A no-new-data communication lab: you script, record, and self-critique a 5–8 minute portfolio walkthrough, build a personal 'story bank' of trade-off and failure answers mined from your own ADRs, and run two timed mock rounds (a human behavioral round and an AI-screen round) against a scoring rubric. The deliverable is evidence that a human — you — did the work and can explain the judgment behind it.
- Story-mine your own repos (60 min): open your Project 1 and capstone ADRs, quarantine logs, and architecture docs. Extract at least 8 raw decision points into the story-bank template — one row each for the grain choice, an SCD/CDC choice, the MDM match-threshold choice, a quarantine/quality gate, an idempotency guarantee, a governance (Unity Catalog) choice, a cost/measure-first optimization, and one genuine failure you hit and fixed.
- Convert 5 rows to the TRADE-OFF shape (45 min): for each, write one sentence in 'I chose X over Y because Z, which cost me A, and I would revisit via B.' Reject any row where A ('what it cost') or B ('how I'd revisit') is blank — a missing cost is the tell of a rehearsed non-answer. Every Z must name a person or role.
- Convert 3 rows to the FAILURE-STORY shape (45 min): scene → what you SAW (the actual symptom in data/logs, e.g. row counts doubling, a null spike, a duplicate golden record) → diagnosis in order → the fix → one lesson. Keep each to ~90 seconds spoken.
- Script the walkthrough (45 min): fill the walkthrough beat-sheet scaffold — 30s framing / 60s architecture+one ADR / 3–4 min bronze→silver→gold→golden-record demo narrating one live quality decision / 60s second project as repeatable method / 30s ownership close. Write speaker notes, not a read-aloud paragraph; mark the ONE decision you will narrate live.
- Prep the 30-second skim (20 min): before recording, verify the two repos pass the skim test — README leads with business framing + architecture diagram, ADR folder visible, tests/quarantine visible, a badge or CI status. Fix anything that would make a skimmer think 'tutorial.'
- Record take 1 and self-score (40 min): screen-record the walkthrough (Loom/OBS/QuickTime). Watch it once against the rubric: Did you open with a person, not a tool? Did you stay in 5–8 min? Did you narrate a live decision, not just click? Did you end on golden records + ownership? Note the three weakest moments.
- Record take 2 (30 min): re-record fixing only those three moments. Do NOT polish to 'too clean' — leave the natural seams. Keep both takes; you will compare in the live session.
- Run the AI-screen simulation (30 min): use the provided prompt runner (or a phone timer) for 5 prompts, HireVue rules — prompt shown, 30s think, one 2–3 min take, no re-record, camera on. Save all five clips unedited.
- Draft your answer-key notes (15 min): for each AI-screen clip, jot the one improvement you'd make — this becomes your pre-interview warmup sheet, not a re-record.
- Amazon Behavioral Interview / STAR method and Leadership Principles (official prep guidance)
- HireVue — how asynchronous / AI video interviews work (candidate guidance)
- Architecture Decision Records (ADR) — Michael Nygard's original template and pattern
- Loom — record and share a screen + camera walkthrough (free tier)
- OBS Studio — free open-source screen recorder (Loom alternative, fully local)
</> Starter scaffold — walkthrough_beatsheet_and_storybank.md markdown
# Portfolio Walkthrough Beat-Sheet + Story Bank (STARTER — fill every TODO)
## PART A — 5–8 min Walkthrough beat-sheet
# Rule: every beat names a PERSON/ROLE before it names a tool. Mark the ONE decision you narrate live with (LIVE).
### [0:00–0:30] Business framing (RECOGNITION before evaluation)
- Who is hurt when this data is wrong? TODO: <named role, e.g. "the finance analyst reconciling contracted prices">
- The one-line stakes: TODO: <what bad decision the wrong data causes>
- DO NOT open with "So I used Databricks..." <- delete this line only when you've replaced the opener above
### [0:30–1:30] Architecture in 60s (slow-front-end, fast-back-end)
- Grain of the gold product: TODO: <one row = ____>
- The 4-part arch doc lives at: TODO: <repo link>
- The ONE ADR I'll name out loud: TODO: <decision + the person it served>
### [1:30–5:00] Demo path bronze -> silver -> gold -> golden record
- Bronze (raw, recoverable history): TODO: <what I show>
- Silver (conformed + quality gate): TODO: <the quarantine/test I point at>
- (LIVE) Narrate ONE decision as it happens: TODO: <e.g. match threshold, idempotent MERGE key>
- Gold / MDM golden record: TODO: <the survivorship rule + why>
### [5:00–6:00] Second project = proof of a repeatable METHOD
- Same spine, different industry: TODO: <one contrast that proves it wasn't luck>
### [6:00–6:30] Ownership close
- What I'd watch in prod / what I'd revisit: TODO: <one honest item>
---
## PART B — Story Bank (one row per decision; convert to a shape)
# Reject any TRADE-OFF row with an empty COST or REVISIT column.
| # | Decision point | Shape | X (chose) | Y (over) | Z (because — NAME THE PERSON) | A (cost) | B (revisit via) |
|---|----------------|-------|-----------|----------|-------------------------------|----------|-----------------|
| 1 | Grain | trade-off | TODO | TODO | TODO | TODO | TODO |
| 2 | CDC / SCD | trade-off | TODO | TODO | TODO | TODO | TODO |
| 3 | MDM threshold | trade-off | TODO | TODO | TODO | TODO | TODO |
| 4 | Quality gate | trade-off | TODO | TODO | TODO | TODO | TODO |
| 5 | Governance | trade-off | TODO | TODO | TODO | TODO | TODO |
### Failure stories (3 rows) — scene -> what I SAW -> diagnosis in order -> fix -> one lesson
- F1: TODO scene | SAW: TODO <the symptom in data/logs> | diagnosis: TODO -> TODO -> TODO | fix: TODO | lesson: TODO
- F2: TODO ...
- F3: TODO ...
---
## PART C — AI-screen runner (HireVue rules: 30s think, one 2-3 min take, no re-record)
# TODO: run these 5 prompts on a timer; save clips; do NOT re-record.
prompts = [
"Tell me about a time you caught a data-quality problem others missed.", # TODO answer live
"Describe a technical decision you would make differently now.", # TODO
"Walk me through a disagreement about a design choice.", # TODO
"Tell me about the hardest ambiguity in your capstone.", # TODO
"Why this architecture and not something simpler?", # TODO (defend-your-design)
]
# TODO: after each, write ONE improvement note in your warmup sheet — not a re-record.
- The Senior Engineer Interview Question Exposing Impostors
- Your Portfolio Project Is Getting You Rejected!
- Successful Interviewing Coursera · Course
- Cracking the Data Engineering Interview O'Reilly · Book
Deliverable, acceptance & live session
- Walkthrough is 5–8 minutes, opens on a named person/role (not a tool), narrates at least one design decision live during the demo, and closes on golden records + an ownership statement. Every trade-off answer resolves Z to a person and has non-empty cost (A) and revisit (B) fields. At least 3 failure stories follow scene→SAW→diagnosis-in-order→fix→lesson. AI-screen round: 4 of 5 prompts answered within the time box in one take, scored 'senior' on the rubric's 'why not what' and 'ties to a person' rows. Both repos pass the skim checklist. A peer or the mentor could retell your two-project story after watching once.
Recap Live session (60–75 min): each learner plays their stronger walkthrough take (or the weakest 90 seconds of it) to the group. The cohort scores it live on two rubric rows only — 'did they open with a person, not a tool?' and 'did they narrate a decision or just click?' We then diff take 1 vs take 2 to show what improved and, deliberately, to catch anyone who over-polished into 'too clean.' Recap the two shapes and the 'why not what' reframe with real cohort examples.
Misconception The dominant misconception: that a great walkthrough is a fluent tour of the tech ('here's my Auto Loader job, here's my MERGE, here's Unity Catalog'). That reads as junior no matter how smooth. We surface it by asking, mid-tour, 'who was hurt when this was wrong?' — and watching people who can't answer without restarting. The fix is drilled live: reframe every 'what I built' sentence into a 'who it served / what it cost' sentence. Second misconception: that admitting a revisit (B) is weakness — we reframe it as the single strongest seniority signal ('you do not need perfect decisions, you need explainable ones').
Hot seat "Defend-your-design gauntlet: the mentor picks one learner's capstone and fires three adversarial 'why didn't you just…' challenges in a row — e.g. 'why not just a SQL view instead of a gold table?', 'why MDM at all — is dedup not enough?', 'why Databricks and not Postgres for this volume?' The learner must convert at least one into an explicit costed trade-off ('that's the right question — here's what skipping it would have cost the [named role]') rather than defending. Then a cold behavioral: 'tell me about the data-quality bug you were most embarrassed by' — graded live on the failure-story shape (did they say what they SAW, and diagnose in order?)."
W48 Capstone (W48-50) - ship & defend your own end-to-end data product M37 · Phase 4 · launch · capstone · W48–50 G1G9G10 ~33h
- Ship an independent, governed medallion pipeline on your own industry - charter + 4-part architecture doc + at least 3 ADRs, bronze/silver/gold, CDC/incremental with proven idempotency, MDM golden records, Unity Catalog governance, tests + quarantine, and a DAB deployed through CI/CD - runnable end to end from a clean clone.
- Prove idempotency and recoverability with evidence: re-run the same load twice and show gold row counts and golden-record keys are byte-for-byte stable, and replay one day of history to show the pipeline reconstructs the same state.
- Defend every non-trivial decision in writing using the trade-off shape ('I chose X over Y because Z, which cost me A, and I would revisit via B'), tied to a named stakeholder rather than a tool.
- Package the work so a reviewer reaches 'this is senior' within a 30-second GitHub skim: README with grain, lineage diagram, run instructions, and a 5-8 minute recorded walkthrough that opens on the business question and ends on golden records.
- Operate a real quality gate: define measurable data-quality expectations, route violations to a quarantine table with a written reason code, and demonstrate that a bad batch fails loudly without corrupting gold.
- Capstone scoping & the 'defensible slice' (0.75h): how to cut your own industry problem down to one grain and one business question you can actually ship in three weeks - narrow-and-complete beats broad-and-broken. Recognition-before-evaluation: write the business framing first, in the voice of the person who feels the pain.
- The 30-second senior skim (0.5h): what a hiring reviewer looks for on a GitHub landing - README grain statement, architecture diagram, ADRs, run-from-clean-clone instructions, tests, CI badge. Reverse-engineering your repo layout from that skim.
- Portfolio narrative: the two-project arc (0.5h): sequencing Project 1 (healthcare, productionized) and your capstone into one story that ends on golden records - what each project proves, and the failure-story you will tell about each in an interview (scene -> what you SAW -> diagnosis in order -> fix + one lesson).
- Harden-and-prove checklist (0.75h): the difference between 'it ran once' and 'it is recoverable' - idempotency proof, replay/backfill proof, quarantine proof, teardown-and-redeploy proof. Documentation as interview prep: every proof is a screenshot or logged assertion you can show.
- The defense rehearsal (0.5h): anticipating the three hardest questions about your capstone (Why this grain? What happens on a duplicate/late/malformed record? How would this scale or break?) and pre-writing the trade-off-shaped answers.
Hands-on lab · ~30h
A three-week solo build sprint that turns your Week 44 charter into a shipped, defensible data product on your own industry. Week one is design and the bronze/silver foundation; week two is the gold layer, CDC/incremental with idempotency, and MDM golden records; week three is governance, tests/quarantine, DABs/CI-CD hardening, and a recorded walkthrough. You work mostly solo with minimal scaffolding - the point is to prove you can do it without hand-holding. Learners without a viable second source instead extend Project 1 with a new business question and a new source, applying the identical checklist.
- WEEK 1 - DESIGN & CHARTER LOCK (design before code). Finalize the project charter: name the stakeholder, the one business question, the grain of your gold product, the definition of 'done', and explicit non-goals. Write the 4-part architecture doc (context/sources -> logical medallion design -> physical Databricks/Unity Catalog layout -> operations & recovery). Open an ADR log and write your first 3 ADRs (e.g., source choice, grain choice, incremental strategy). Commit charter + architecture + ADRs BEFORE any pipeline code - slow on the front end, fast on the back end.
- WEEK 1 - SOURCE & BRONZE. Ingest your real messy source (data.gov / CMS / SEC EDGAR / CoinGecko / ReliefWeb / NOAA / Faker for locked-down domains) into a bronze table exactly as received: full fidelity, source metadata columns (ingest timestamp, source file/endpoint, batch id), no cleaning. Profile the raw data and write down, in the README, the three messiest things you found (nulls, dupes, drifting schema, encoding, late records) - these become your silver requirements.
- WEEK 1 - SILVER, TESTED. Build silver: typed, deduplicated, conformed, with a clear primary key at the declared grain. Encode your data-quality expectations as explicit assertions and route failures to a quarantine table with a written reason code - do not silently drop rows. Add the first round of tests (schema, not-null on keys, uniqueness at grain, referential checks). Prove a deliberately corrupted batch lands in quarantine and does NOT reach silver.
- WEEK 2 - GOLD PRODUCT. Model the gold layer to answer the charter's business question at the declared grain (dimensional or wide aggregate as fits). Write the grain statement at the top of the gold table doc. Validate gold against a hand-computed spot check so you can defend the numbers, not just produce them.
- WEEK 2 - CDC / INCREMENTAL + IDEMPOTENCY PROOF. Convert the load from full-refresh to incremental (MERGE / change-feed / watermark as appropriate). Then PROVE idempotency: run the identical incremental load twice and capture evidence that gold row counts and keys are unchanged. Replay one prior day/batch and show the pipeline reconstructs the same state (recoverable history). Log both proofs as assertions or screenshots in the repo.
- WEEK 2 - MDM GOLDEN RECORDS. Resolve entities across your source(s) into golden records: define match rules, survivorship rules (which field wins and why), and a stable golden key. Document why you chose deterministic vs probabilistic matching and what a wrong merge would cost the stakeholder. Show a before/after on a real duplicate cluster from your data.
- WEEK 3 - GOVERNANCE & SECURITY. Put the whole product under Unity Catalog: catalog/schema layout, table + column comments, ownership/grants that reflect least privilege, and lineage you can screenshot. Tag or mask at least one sensitive column and write one sentence on the governed-access decision and who it protects.
- WEEK 3 - DABs / CI-CD HARDENING. Package everything as a Databricks Asset Bundle and deploy through a CI/CD pipeline (lint + tests run on push, bundle deploys the job). Prove repeatable deployment: tear the job down and redeploy it from a clean clone with one command, and confirm it runs green. This is the 'repeatable deployment' pillar made real.
- WEEK 3 - RECORD, POLISH & DEFEND. Finalize the README for the 30-second senior skim (grain, diagram, run instructions, test/CI badges, ADR links). Record a 5-8 minute walkthrough that opens on the business question and ends on golden records. Pre-write trade-off-shaped answers to the three hardest questions about your build. Do a final teardown-redeploy-rerun to confirm end-to-end reproducibility before you call it shipped.
- Databricks Asset Bundles (DABs) - overview & CI/CD
- Unity Catalog - governance, lineage, and grants
- Delta Lake MERGE INTO (idempotent upserts / CDC)
- Delta change data feed (CDC / incremental)
- The medallion (bronze/silver/gold) architecture
- Architecture Decision Records (ADR) - Michael Nygard's original template
</> Starter scaffold — capstone_scaffold/README_and_merge_scaffold.md python
# capstone/ (repo skeleton - the 30-second senior skim starts here)
# README.md <- grain statement, diagram, run-from-clean-clone steps, CI badge
# docs/architecture.md <- 4 parts: context/sources | logical | physical | ops & recovery
# docs/adr/0001-*.md ... <- >= 3 ADRs, Nygard template
# databricks.yml <- DAB bundle (TODO: define job, targets, CI deploy)
# src/bronze.py src/silver.py src/gold.py src/mdm.py
# tests/ .github/workflows/ci.yml
from pyspark.sql import DataFrame, SparkSession
from delta.tables import DeltaTable
# --- INCREMENTAL, IDEMPOTENT UPSERT STUB -------------------------------------
def merge_incremental(spark: SparkSession, source_df: DataFrame,
target_table: str, business_keys: list[str]) -> None:
"""Upsert a batch into a Delta target so that re-running the SAME batch
produces the SAME target (idempotency). Fill the TODOs; do not ship stubs."""
# TODO(grain): assert source_df is unique on `business_keys` BEFORE merge,
# or your MERGE will double-count. Route violations to quarantine.
# TODO(cdc): if using change data feed / watermark, filter source_df to the
# new increment here and record the watermark you consumed.
merge_condition = None # TODO: build "tgt.k = src.k AND ..." from business_keys
tgt = DeltaTable.forName(spark, target_table)
(tgt.alias("tgt")
.merge(source_df.alias("src"), merge_condition) # TODO: real condition
# TODO: whenMatchedUpdate only when a change is detected (hash compare)
# TODO: whenNotMatchedInsertAll()
.execute())
# TODO(proof): after merge, assert row_count(target) and key-set are stable
# on a second identical run; log the assertion into docs/ as your evidence.
# --- QUALITY GATE + QUARANTINE STUB -----------------------------------------
def split_valid_quarantine(df: DataFrame) -> tuple[DataFrame, DataFrame]:
# TODO: encode your declared expectations (not-null keys, unique at grain,
# domain/range checks). Return (valid, quarantined_with_reason_code).
# Never silently drop - every quarantined row carries a written reason.
raise NotImplementedError
# --- MDM GOLDEN RECORD STUB --------------------------------------------------
def resolve_golden_records(silver_df: DataFrame) -> DataFrame:
# TODO: match rules (deterministic vs probabilistic - justify in an ADR)
# TODO: survivorship rules (which field wins, why) + stable golden key
raise NotImplementedError
- 30-Day Databricks Portfolio Projects That Get You Hired
- The Data Project That Actually Gets You Hired!
- Example repo: ca-public-health-facility
- DE Job-Search Blueprint (free)
- Data Engineering Professional Certificate (DeepLearning.AI) Coursera · Certificate
- Data Engineer in Python (career track) DataCamp · Track
Deliverable, acceptance & live session
- Reproducibility: a reviewer clones the repo and deploys the DAB with one command, the CI pipeline runs green (lint + tests), and the job runs end to end. Idempotency: running the incremental load twice leaves gold row counts and golden-record keys unchanged, with the proof committed. Recovery: replaying one prior batch reconstructs the same gold state. Quality: a deliberately corrupted batch lands in quarantine with a reason code and never reaches gold. Governance: Unity Catalog shows ownership, comments, lineage, and at least one masked/tagged sensitive column. Defensibility: the README states the grain in one sentence, ADRs justify source/grain/incremental/matching choices in trade-off shape, and the walkthrough opens on the business question and ends on golden records.
Recap Each learner gives a 3-minute 'state of the capstone' at the top of the live review: the one business question, the current grain, and the single hardest decision made this week framed as 'I chose X over Y because Z.' The cohort mirrors back only 'why', not 'what' - if an answer names a tool instead of a person or a decision, the room flags it. Recap the week's proofs (idempotency, quarantine, recovery) as show-me-the-evidence, not describe-it.
Misconception 'The capstone should show everything I learned.' No - breadth-and-broken reads as junior; one narrow grain shipped completely, recoverable, and governed reads as senior. The second killer misconception: 'idempotent' means 'it ran without error twice.' It does not - it means the SECOND identical run produces the SAME output, and you must show the row-count/key evidence, not assert it. A third: quarantine is not 'drop the bad rows' - a dropped row is an untracked data-loss decision you cannot defend.
Hot seat "Screen-share your gold table and its grain statement. In 90 seconds, defend three things to a skeptical head of operations who has never met you: (1) Why THIS grain and not one level finer or coarser? (2) A duplicate, a late-arriving, and a malformed record each hit your pipeline tonight - walk me through exactly what happens to each and why gold stays trustworthy. (3) Your golden-record logic merged two entities that a domain expert says are actually different - how did that happen, what did it cost, and how would you revisit it? Answers must be trade-off-shaped and tied to a person, not a tool."