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.

MediumTechnical
40 practiced

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.

MediumTechnical
35 practiced

Given a users table and a transactions table, write a SQL query using window functions to build a per-user feature/summary table in one pass: last transaction date, a rolling count of transactions in the past 30 days, a rolling average amount over the past 90 days, and days since signup. Explain how you handle a user who has never transacted.

MediumTechnical
32 practiced

Given a column of monetary strings in inconsistent formats (currency symbols, thousands separators, negative amounts shown in parentheses, various locale conventions, or NULL), write a SQL transformation that normalizes them into a numeric decimal. Explain your assumptions and how you handle formats you cannot confidently parse (fail closed versus a best-effort guess).

HardTechnical
36 practiced

You must deduplicate a dataset with billions of records spread across many files in object storage; it does not fit into a single machine's memory. Describe (pseudocode is fine) an out-of-core approach using external sorting or hash-partitioning with spill-to-disk, and explain how you would parallelize it across machines or cores while bounding memory use per worker.

MediumTechnical
30 practiced

Given a free-text address field with inconsistent layouts across countries, describe a strategy to parse and canonicalize it into structured components (street, city, region, postal code, country) suitable for matching and analytics, including how you would handle a case your approach can't confidently resolve. As a smaller related exercise, implement a general text-normalization function that trims whitespace, collapses repeated internal whitespace, strips control characters, and preserves Unicode letters and emoji.

Unlock Full Question Bank

Get access to all 42 Data Transformation and Processing Logic interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.