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.
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.
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.
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.
You receive phone numbers from several partners in inconsistent formats (with or without country codes, extensions, punctuation, or leading zeros). Design a normalization and validation workflow that produces a single canonical format suitable for matching and analytics, including how you would flag numbers you cannot confidently normalize and any privacy considerations for storing them.
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?
Unlock Full Question Bank
Get access to all 42 Data Transformation and Processing Logic interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.