Data Transformation and Processing Logic Questions
Implementing transformation logic: joins, aggregations, deduplication, pivoting/reshaping, and business-rule application over datasets. Covers writing correct and maintainable transformation code, handling edge cases in the transform layer, and preparing data for downstream consumption. Focuses on the logic of turning raw data into analytics-ready outputs.
Explain how NULL participates in SQL comparisons, joins, and aggregations, contrasting it with an empty string and with zero. Describe three common pitfalls this causes when joining or aggregating real data, and the standard techniques (COALESCE, explicit NULL checks, filtering) used to handle each.
A stakeholder reports that joining two tables produced more rows than either input table (for example, 10,000 orders joined to 200 refunds produced 10,500 result rows). Walk through how you would debug this: what you would check first, what a sample query would look for, and how you would explain the root cause (and the fix) in plain language to a non-technical stakeholder. Separately, describe how you would resolve it when the two tables also share a column name (like id or created_at) that means something different in each source.
You are handed a real customer transaction extract with several simultaneous problems: inconsistent date formats, duplicate rows, missing category labels, and a few extreme outliers. Walk through how you decide which issues to fix automatically, which to flag for manual review, and which to leave as-is for downstream analysis to handle, and what business context you would need before making those calls.
Some aggregations (sum, count) are associative and trivially parallelizable across a distributed dataset with a guaranteed deterministic result. Others, like median or percentile, are not. Discuss how you would compute an approximate percentile at scale with a mergeable, deterministic algorithm (for example a t-digest or histogram sketch), and separately, how you would implement a scalable approximate 'distinct count' (for example unique users in the last 30 days) using a structure like HyperLogLog, including the accuracy/memory trade-off of each.
Implement a Python generator that reads a large CSV file in fixed-size chunks, applies a transformation to each chunk, and yields (or persists) the transformed results without ever loading the whole file into memory. Handle header rows, malformed lines, and different encodings, and describe how the job could resume from the last successfully processed chunk after a failure.
Unlock Full Question Bank
Get access to all 34 Data Transformation and Processing Logic interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.