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
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
37 practiced

A Spark job repeatedly runs out of memory during the shuffle phase of a join. Walk through a diagnostic checklist you would use to find the cause, and the fixes you would try once you've narrowed it down.

MediumTechnical
29 practiced

Multiple data sources represent the same categorical attribute with different spellings or abbreviations (for example 'NY', 'New York', 'new_york', 'NYC' all meaning the same state or city). Describe a practical pipeline to detect, normalize, and maintain a mapping for these variants before merging datasets, including fuzzy matching, a maintained ruleset, and a human-in-the-loop step for ambiguous cases.

MediumTechnical
28 practiced

Design and implement a streaming deduplication component that consumes a stream of (id, timestamp) events and reports whether each event is new or a duplicate within a bounded time window, using bounded memory (an LRU cache or a Bloom filter, your choice). Discuss the correctness trade-off of the approach you chose: can it produce false positives or false negatives, and what does that mean for events that get silently dropped or double-counted?

HardTechnical
61 practiced

Two large files (or datasets) that do not fit into memory must be joined on a common key. Describe (pseudocode is fine) an external sort-merge join: sorting each side into runs on disk, merging the runs, and streaming a join over the two sorted streams. Explain how you would parallelize this across CPU cores or machines and how you would handle a skewed join key.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.