InterviewStack.io LogoInterviewStack.io

Data Quality and Edge Case Handling Questions

Practical skills and best practices for recognizing, preventing, and resolving real world data quality problems and edge cases in queries, analyses, and production data pipelines. Core areas include handling missing and null values, empty and single row result sets, duplicate records and deduplication strategies, outliers and distributional assumptions, data type mismatches and inconsistent formatting, canonicalization and normalization of identifiers and addresses, time zone and daylight saving time handling, null propagation in joins, and guarding against division by zero and other runtime anomalies. It also covers merging partial or inconsistent records from multiple sources, attribution and aggregation edge cases, group by and window function corner cases, performance and correctness trade offs at scale, designing robust queries and pipeline validations, implementing sanity checks and test datasets, and documenting data limitations and assumptions. At senior levels this expands to proactively designing automated data quality checks, monitoring and alerting for anomalies, defining remediation workflows, communicating trade offs to stakeholders, and balancing engineering effort against business risk.

MediumTechnical
64 practiced
Write a SQL query that computes daily percentage = successful / total from table daily_counts(date, successful int, total int). Ensure you guard against division by zero and return percentage with two decimal places and a boolean flag 'zero_total' when total is zero.
EasyTechnical
66 practiced
Describe practical strategies to guard against division by zero in production code and SQL. Provide short examples in SQL and Python showing safe division, default values, and when you might prefer NULL vs 0 as the result.
HardTechnical
63 practiced
A production aggregation intermittently returns NULL for a computed column, but the same query returns values in staging. Describe a systematic debugging approach: how to sample problematic rows, check schema and engine version differences, instrument failing rows to capture context, and implement a long-term fix to avoid recurrence.
MediumSystem Design
85 practiced
Design a deduplication strategy for a high-throughput Kafka event stream where duplicates arrive due to producer retries within a 5-minute window. Explain how to detect duplicates, ensure idempotency at the consumer level, manage state (TTL, storage), and the trade-offs between memory usage, correctness, and throughput.
HardTechnical
63 practiced
Design an A/B experiment to measure the business impact of loosening a data-quality rule that currently rejects 0.5% of incoming events. Describe how to split traffic, metrics to measure (downstream conversion, error rates), sample size/power calculations, safety rollbacks, and how to ensure no production corruption occurs.

Unlock Full Question Bank

Get access to hundreds of Data Quality and Edge Case Handling interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.