Data Quality interview questions
Data Quality questions a Data engineer can be asked, from first job to senior. Open one to see the strongest answer and why it works.
What is the first quality test on a modelled table?
The strongest answer: Uniqueness of the declared grain, and not-null on the keys — I do not start with a 40-rule dump
Why it works: Exactly. Grain tests catch the expensive bugs. Frozen counts and screenshots are not tests of meaning.
- Unique grain + not-null keys.
- Few, owned tests first.
- Do not freeze row counts forever.
- DAGs are not assertions.
What is the difference between testing pipeline code and testing the data it produces, and why do you need both?
The strongest answer: Code tests run at build time on fixed inputs and prove the logic; data tests run after each load on the real output — key uniqueness, not-null, accepted values, counts — and catch what the source did today
Why it works: Exactly — one guards the logic, the other guards each day’s data; they fail for different reasons.
- Test the code and the data.
- Code tests: fixed inputs, build time.
- Data tests: every load, real output.
- Right code, wrong input still fails.
A producer renamed amount to amt. What should have failed?
The strongest answer: A contract or schema check on their pipeline, before your model went red at 9am — not a Slack “heads up” after
Why it works: Exactly. Breaking shapes fail at the producer. Slack after is an autopsy.
- Fail the producer on a break.
- Contracts before 9am red.
- Names are APIs.
- Do not Slack after.
A not-null column started arriving 100% NULL. What should the job do?
The strongest answer: Fail or quarantine — I do not load a pretty empty and call the SLA met
Why it works: Exactly. A broken contract is a fail. Green-by-zero and FYI-loads are how Sunday looks like a quiet market.
- Fail or quarantine.
- Do not COALESCE to stay green.
- Do not drop the column to cope.
- FYI ≠ a page.
Who runs the contract test when a field type changes?
The strongest answer: The producer, on their PR, against consumer schemas — consumers should not be the first alarm at 9am
Why it works: Exactly. Producer gate. Weekly mail and after-load are late. Agile is not a skip.
- Producer PR verifies consumers.
- Do not wait for 9am models.
- Mail ≠ gate.
- Agile ≠ no contract.
You have 300 dbt tests and nobody looks. What do you do?
The strongest answer: Promote a few to blocking + paged; demote the rest to warn — a sea of yellow is no test
Why it works: Exactly. Scarce pages. More, none, and muted badges are the failure modes.
- Few blocking, paged tests.
- Warn on the long tail.
- Do not add a sea.
- Do not mute and badge.
A board metric is wrong. How do you walk lineage?
The strongest answer: From the metric to the certified model to the raw landing — I do not start by rewriting the dashboard SQL as a guess
Why it works: Exactly. Walk the parents. Random reverts and averages are how you get a third number.
- Metric → model → raw.
- Do not guess-rewrite first.
- Lineage ≠ on-call folklore.
- Do not average a second metric.
The source API is 6 hours late. Your SLA is 1 hour. What do you publish?
The strongest answer: A residual: we cannot meet 1 hour until the source does — I do not hide their lateness as our green
Why it works: Exactly. SLAs have parents. Fake green and silent waits are lies. Page the owner of the wait.
- Publish the source residual.
- Do not wear their lateness as green.
- Escalate to the source owner.
- Do not silent-wait as a strategy.
You can ship a 10-minute number that will restated, or a 6-hour final. How do you choose?
The strongest answer: By the decision — ops may want the fast as-of; finance may want the final — I publish both with labels, not one unnamed
Why it works: Exactly. Two products, two labels. Unnamed fast and ops-blind final are how people fight.
- Match the decision.
- Label as-of vs final.
- Do not unnamed-fast.
- Do not average two clocks.
A load finishes green every night. How do you know it is complete — that every source row arrived?
The strongest answer: Reconcile against the source: row counts and a checksum or sum of a key measure per partition, compared with the same figures from the source, with a tolerance and an alert — plus a check that expected partitions exist
Why it works: Exactly — completeness is a comparison to the source, not a look at the destination alone.
- Compare to the source, per partition.
- Counts and checksums, with tolerance.
- Expected partitions exist.
- Green is not complete.
How do contracts survive 40 producers?
The strongest answer: A registry, producer gates, and a small platform owner — not a volunteer who pings Slack on Fridays
Why it works: Exactly. Organisation. Sheets, never-change, and gists are folklore.
- Registry + producer gates.
- A platform owner.
- Versioned breaks.
- No gist dialects.
What does a quality program page besides “tests exist”?
The strongest answer: Freshness, grain, and reconcile on certified tables, with owners and a weekly kill of noisy rules — existence is not a program
Why it works: Exactly. Few paged assertions plus hygiene. Counts, orphan red, and AI-oceans are theatre.
- Page freshness, grain, reconcile.
- Owners on certified tables.
- Kill noisy rules.
- Do not worship test count.
A 03:00 page fired because a test flaked on a volume check. What do you change?
The strongest answer: The check: seasonality, a band, or a warn — I do not page humans for weather, and I do not delete the test
Why it works: Exactly. Tune the assertion. Mute, wider pain, and delete-all are how you miss the real empty table.
- Band the volume.
- Page on breaks, not weather.
- Do not mute the weekend as strategy.
- Do not delete all volume tests.
What does a feature pipeline owe a model besides columns?
The strongest answer: Point-in-time correctness, a serving path that matches training, and a freshness SLO — a lake dump is not a feature store
Why it works: Exactly. Time, parity, freshness. Dumps, shuffles, and PII-as-features are how models lie or leak.
- Point-in-time joins.
- Train/serve parity.
- A freshness SLO.
- No PII-as-default features.
You will break a column on Thursday. What do you owe consumers besides a commit?
The strongest answer: A versioned contract, a dual-run, and a date — a changelog in a repo they do not watch is not notice
Why it works: Exactly. Notice is a product. Code-reading as notice is how 9am dies.
- Version + dual-run + date.
- Notify watchers.
- Repo-only is not notice.
- Do not say “read the code.”
What do you watch besides “DAG green”?
The strongest answer: Bytes, freshness, row-count bands, and the SLA table’s arrival — green boxes can hide an empty partition
Why it works: Exactly. Data signals. Emoji, CPU-only, and quiet-as-health are how empty gold ships.
- Watch freshness and bands.
- Watch the SLA table.
- Green ≠ full.
- Do not trust quiet.
How do you treat certified gold like an API?
The strongest answer: Consumers, SLOs, versions, and an on-call — a table without those is a file
Why it works: Exactly. If it has users, it has an SLO. Hope, logos, and yearly rebuilds are not operations.
- Consumers + SLO + versions.
- On-call for gold.
- Hope is not an SLO.
- Do not annual-rebuild as ops.
What do you take to the board about data, and what do you refuse to invent?
The strongest answer: SLO on certified gold, residual versus the book, and incidents with owners — not a “data quality score” you made up or a percentile of peers
Why it works: Exactly. Operable SLOs and residuals. Invented scores and peer percentiles are honesty violations.
- Gold SLO + book residual.
- Incidents with owners.
- No homemade quality score.
- No invented percentiles.
How do you know the platform is getting healthier?
The strongest answer: SLA hit rate, pages per week, cost per certified table, and contract-break escapes — not a feeling that “the DAG was angry”
Why it works: Exactly. Operable health. DAG counts, vibes, and green emails can be skip-fests.
- SLA, pages, cost, escapes.
- Do not worship DAG count.
- VP mentions are not health.
- Green email can lie.
Quality exceptions are how the company ships data. What do you change first?
The strongest answer: Publish the exception rate next to freshness, expire the oldest, and staff the test that made people ask — do not start with a shame list
Why it works: Exactly. Visibility plus a better test. Shame, freezes, and hidden books grow shadows.
- Publish the rate.
- Expire the oldest.
- Fund the test.
- No shame list, no hidden book.
Main’s DAGs are always green and nobody trusts the tables. What do you inspect?
The strongest answer: Empty successes, muted tests, skipped backfills, and who can mark success by hand — cheap green is the expensive kind
Why it works: Exactly. Distrust is a clue the gate is decorative. More tasks on a lying DAG make a larger lie.
- Inspect empty success and mutes.
- Inspect manual success.
- Do not paint a brighter badge.
- Do not hide distrust.