Data Quality and Validation Questions
Ensuring correctness and trust in data: validation rules, constraints, completeness/accuracy/timeliness checks, and quality frameworks. Covers designing validation into pipelines, quality gates before publishing, and handling edge cases and real-world dirty data. Central to any data engineering or analytics role.
Design a production system for detecting distribution drift in a numeric or categorical feature/column: describe the statistical tests or metrics you would use (a KS-test or chi-squared test against a baseline, or a Population Stability Index computed incrementally from stored histograms rather than recomputed from scratch each time), how you would set alert thresholds and account for seasonality so you do not fire on every transient spike, and how you would control the false-discovery rate when running this check across thousands of columns or metrics simultaneously.
A dashboard shows a sudden, unexplained drop or spike in a key metric (for example a 40% drop in daily active users, or a funnel conversion rate falling 20% in one day). Walk through a structured, prioritized investigation you would run: which SQL checks and comparisons you would run first and in what order, how you would rule in or out an upstream ingestion problem versus a genuine business change, and how you would communicate an interim finding to stakeholders before the root cause is fully confirmed.
When a validation rule fails on incoming data, you generally have three options: quarantine the offending records for review, reject the entire batch, or auto-correct (impute or coerce) and continue. Give three decision criteria for choosing between them, and design the quarantine-and-replay mechanism itself: how rejected records are captured with a structured error reason, searched, and safely re-injected once corrected.
You operate a pipeline ingesting on the order of a million events per minute. Define a concrete, justified set of operational data-quality metrics and alert thresholds you would instrument: ingestion lag/freshness, row-count deltas versus an expected baseline, null-rate spikes, schema-change events, and duplicate rate. For each metric, state a starting alert threshold and severity tier, and explain how you would distinguish a real regression from normal day-to-day variance.
You own a data transformation function that normalizes user records (addresses, phone numbers) before they enter the warehouse. Write a focused set of unit tests for it, explicitly covering: a normal well-formed input, a completely empty or zero-row input, a single-row input, a malformed/unparseable value, and an unexpected extra field. For each test state what you are asserting and why a data-quality-focused test suite needs the zero-row and malformed cases as much as the happy path.
Unlock Full Question Bank
Get access to all 42 Data Quality and Validation interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.