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.

HardSystem Design
41 practiced

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.

EasyTechnical
33 practiced

Explain the difference between a schema mismatch (a field's structure or presence changed, for example a JSON field sometimes arriving as an array and sometimes as a scalar) and a simple data-type inconsistency (a numeric value arriving as text). Give a concrete example of each and describe the downstream consequences for analytics: a failed load, a silently broken join, or a miscalculated aggregate.

MediumTechnical
33 practiced

A column receiving dates from multiple sources contains a mix of formats: ISO 8601 strings, MM/DD/YYYY, 'DD Mon YYYY', epoch timestamps, and outright malformed strings. Design a robust normalization approach (in SQL or Python) that parses each recognized format into a single canonical representation, explicitly flags and logs unparseable rows for review rather than silently dropping or misinterpreting them, and handles the classic ambiguous case (03/04/2020 could be March 4th or April 3rd) safely.

EasyTechnical
35 practiced

Write a query to find duplicate rows on a natural key (for example, the same email or the same combination of columns appearing more than once). Show both the GROUP BY / HAVING COUNT(*) > 1 form and the ROW_NUMBER() OVER (PARTITION BY ... ORDER BY ...) form that lets you keep exactly one canonical row per group, and explain when you would reach for each.

MediumTechnical
43 practiced

Why does a single, versioned source of truth for a metric's definition matter, and what breaks when it is missing? Give an example of a metric silently changing meaning (for example "active user" being redefined) and describe a structured framework for evaluating data quality across two sources reporting different values for the same KPI: how you would compare lineage, freshness, and transformation logic to decide which source (or which reconciled figure) to trust, and how you would communicate the remaining uncertainty.

Unlock Full Question Bank

Get access to all Data Quality and Validation interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.