Data Engineer Interview Question

How do you test data quality in a pipeline, and what do you test for?

What the interviewer is probing, how to structure your answer, and a spoken example you can adapt.

Quick answer

Test schema, volume, and semantics. Schema tests catch type and column changes. Volume and freshness tests catch a partition that arrived empty or late. Semantic tests assert uniqueness of keys, non null on required fields, accepted values on enums, referential integrity between fact and dimension, and business invariants such as revenue never being negative. Run them in the pipeline and fail or quarantine rather than publish silently.

Why interviewers ask this

Interviewers want to know whether you ship data with checks or with hope. The strongest signal is what happens when a test fails: blocking downstream models, alerting the owner, and quarantining bad records rather than logging a warning nobody reads. Mentioning anomaly style checks on row counts shows you have been burned by silent partial loads.

How to structure your answer

  • Group tests into schema, volume and freshness, and semantic categories.
  • Give concrete assertions for each category.
  • Define severity: what blocks the pipeline and what only warns.
  • Describe quarantine of bad rows rather than dropping them.
  • Explain who gets alerted and with what context.

Example answer

Spoken example, first person

I think in three layers. Schema: column exists, type has not changed, no unexpected new nullable field silently appearing. Volume and freshness: this partition has a row count within a sensible band of the trailing average, and the latest event is not eight hours old. Semantics: primary key is unique, required fields are non null, status is in the accepted set, every order references a customer that exists, and revenue is not negative. In dbt those are mostly built in tests plus a handful of singular SQL tests for business rules. The part that matters more than the tests is the policy. A failed uniqueness test on a primary key blocks the downstream marts, because publishing duplicated revenue is worse than publishing nothing. A soft warning like a 20% row count drop alerts the owning team but does not stop the run. And bad rows go into a quarantine table with the failure reason, so we can measure how often it happens instead of losing the evidence.

Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.

See how it works

Follow-up questions to expect

  • How do you set thresholds for a row count anomaly check?
  • What do you do when a test fails at 4am and nobody is on call?
  • How do you avoid alert fatigue from data quality checks?

Related data engineer questions

Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.

Predict my questions

Rehearse the hard questions before they are asked

Practise with a live copilot, then walk in ready. A $29 Session Pass gets you through the interview with no subscription and no lock-in.

Get GhostPilot