Interview questions
Checking data is checking a hypothesis
1Why is checking data different from checking that a disk write or a transaction succeeded?
The disk and the transaction manager hold all the information needed to decide. Data content is a claim about the world, so a check can only fail to refute it against an expectation someone wrote down.
Read morePropositions about the world
2What can a failed data check mean?
Three things: the data is wrong, the world changed legitimately, or the expectation is out of date. The failure alone cannot tell you which.
Read morePropositions about the worldWhat validation forbids
3Where in a pipeline should data checks go?
At ingress, where data arrives from producers you do not control, and at egress, where you publish a promise. In between, test your own transformations with fixtures instead: deterministic code that is wrong is wrong on every run, so checking each run's data finds nothing new.
Read moreTrust boundaries
4What determines how expensive a data-quality check is?
How much state it must consult: one value, one record, a batch, the whole dataset, another table, or history. Checks on a value or a record are almost free; checks across datasets need a join.
Read moreWhat makes a check expensive
The free tier: constraints and schemas
5Why do data warehouses let you declare primary keys but not enforce them?
Enforcement needs matching rows to meet, by co-partitioning or exchanging data on every write, so its cost scales with write volume, while its benefit scales with a tiny defect rate, around 10⁻⁴ to 10⁻⁶.
Read moreWhy the warehouse stopped enforcing themExpensive when the table is distributed
6What happens if a key that is declared but not enforced turns out to be false?
The optimizer still trusts it, so it may remove a DISTINCT or a join and return wrong answers silently, from an engine that is working correctly.
7How can a quality report with 95% coverage still miss fake customer IDs?
Checks on single values verify form, not existence. A well-formed ID that never existed passes every type, range and pattern check.
Read moreThe ceiling: form versus existence
8How do you handle a NULL that can mean four different things?
Make the distinction explicit with values such as NOT_APPLICABLE and UNKNOWN, so it can be checked by membership in a set, and counted.
Beyond one record
9A check that every order has a customer fires every night and then clears by morning. Why?
The two tables load on different schedules, so for part of each night an order exists before its customer row has landed. The rate of false alarms has a floor set by that difference in timing.
Read moreAsynchrony makes a false-alarm floor
10What are the options for removing that false-alarm floor, and what does each cost?
Check both tables at one consistent snapshot, costing staleness; allow a lateness window, costing a blind window; or route violations to a pending state, costing a second pipeline.
Read moreAsynchrony makes a false-alarm floor
11Which data-quality checks are most often configured too weakly?
Freshness and volume. They are the only defence against empty output, which no record-level check can see, yet they are often set as warnings rather than gates.
Read moreFreshness and volume
12Why is a p-value test a poor detector of drift on large tables?
A test's power grows with the number of rows, so with millions of rows any tiny real shift gives a p-value near zero. Measure effect size instead, such as the population stability index or a shift in quantiles, against a business threshold.
13Why does a large suite of data checks always end up ignored?
Multiple comparisons: 12,000 checks at a 0.001 false-positive rate give 12 false alarms a day. Mature setups keep a few gates with authority and many signals without it.
Read moreAlert fatigue is arithmetic
Gates, quarantine and stopping the line
14Warn, quarantine, block or restate: how do you choose what a failed check does?
Block when bad data downstream costs more than no data downstream. That comparison differs for each consumer, so agree it in a contract per consumer.
Read moreThe four-level action space
15What is wrong with quarantining a few bad rows and publishing the rest?
Bad records are not a random sample, so the published remainder is biased in some direction. Publish the quarantine rate, broken down the same way consumers slice the data.
Read moreQuarantine: a quiet bias
16Why do streaming data-quality designs look so different from batch ones?
A stream has no batch boundary, so there is no commit point to gate on. It relies instead on routing individual records, statistics over windows, and circuit breakers.
Read morePublication as a pointer swap
17Why is a circuit breaker expensive in a data pipeline?
Input keeps arriving while the pipeline is stopped, so you owe a backlog, and catching up takes longer the busier the pipeline normally runs. The cost is paid in advance, as spare capacity.
Read moreStop-the-line
Deduplication
18Why is fuzzy deduplication done in two stages?
Comparing all pairs is O(n²). A cheap blocking step picks candidate pairs, and an expensive comparator scores only those.
Read moreFuzzy dedup: a two-stage filter
19What limits recall in fuzzy matching, and how do you improve it?
The blocking step: two records never placed in the same block can never be matched. Run several blocking passes with independent keys, at the price of more candidate pairs.
Read moreRecall is capped by the cheap stage
20Why can loosening a deduplication threshold slightly merge thousands of people into one?
Grouping matches into connected components forces transitivity, and past a tipping point one giant component forms. Cap cluster size, require independent supporting links, or avoid taking the transitive closure.
Reconciliation
21How can two datasets of a billion rows each be reconciled cheaply?
Escalate step by step: counts, then aggregates, then hashes per partition, then a Merkle tree within the partitions that differ. Locating d differences needs about d · log n hashes, not a comparison of every row.
Read moreThe reconciliation ladder
22Why is XOR a poor way to combine row hashes for comparing datasets?
XOR cancels equal values in pairs, so rows duplicated an even number of times are invisible. Modular addition is just as independent of order and does not have that problem.
Read moreThree implementation constraints
23Why does a model give no error on bad input?
It returns a confident number. A divergence shows up weeks later as worse business metrics, when data, model and world are hard to separate.
24Name four kinds of training-serving skew.
Logic, timing, data-source and distribution skew. A feature store addresses the first three; only monitoring detects the fourth.
Read moreTraining-serving skew
25What does a feature store really guarantee?
One shared definition, materialized to an offline and an online store. It removes logic skew, but does not make the two stores equally fresh, so it turns a hidden problem into a freshness metric.
26Why can two separate implementations of the same feature not be verified against each other?
A computation duplicated without a shared substrate can only be reconciled, not verified. The options are a shared definition, shared execution, or continuous reconciliation.