InterviewStack.io LogoInterviewStack.io

Data Cleaning and Business Logic Edge Cases Questions

Covers handling data centric edge cases and complex business rule interactions in queries and data pipelines. Topics include cleaning and normalizing data, handling nulls and type mismatches, deduplication strategies, treating inconsistent or malformed records, validating results and detecting anomalies, using conditional logic for data transformation, understanding null semantics in SQL, and designing queries that correctly implement date boundaries and domain specific business rules. Emphasis is on producing robust results in the presence of imperfect data and complex requirements.

MediumSystem Design
25 practiced
Design an idempotent backfill strategy for correcting a miscomputed 'price' column across a partitioned fact table with hundreds of millions of rows. Explain how to avoid double counting, how to make the operation resumable, how to validate correctness after backfill, and how to minimize impact on consumers while running the job.
HardSystem Design
27 practiced
Design a monitoring and automated response system to detect 'null explosion'—a sudden spike in NULLs for critical columns across datasets. Define the metrics to track (e.g., rolling-null-rate, z-score), alert thresholds, sampling strategies to capture example rows, and automated actions (pause downstream jobs, open a ticket, rollback) to limit damage while allowing investigation.
HardSystem Design
28 practiced
Design an idempotent, low-downtime backfill strategy for a partitioned data warehouse table that contains billions of rows and warms many downstream dashboards. Include partition-level approaches, staging tables, validation checksums, and a rollback plan to minimize consumer impact while ensuring correctness.
HardTechnical
25 practiced
Implement a SQL-based tiered deduplication: given customers(customer_id, source_system, name, email, created_at, completeness_score) where duplicate groups are defined by a fuzzy_key, produce a canonical customer per fuzzy_key by applying business precedence rules: prefer source_system 'crm' over 'import', higher completeness_score, then most recent created_at. Show the SQL pattern and explain how to merge remaining attributes from lower-ranked records.
MediumTechnical
22 practiced
Design heuristics and a SQL filter to detect likely bot-generated activity in web event logs (events table: event_id, user_id, ip_address, user_agent, event_time, event_type). Include examples of features to use (e.g., unusually high event rate, missing user-agent, identical timestamps across many events), and discuss false positive mitigation and how you'd validate your approach with labeled samples.

Unlock Full Question Bank

Get access to hundreds of Data Cleaning and Business Logic Edge Cases interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.