Python data engineering interview problem. Difficulty: beginner. Pattern: Strings. About 10 minutes. Part of the Pro drill bank.
Inventory comes in as one delimited line from a handheld scanner. You need named fields, not a raw string, before it can land in a warehouse table.
Parse a delimited inventory line into the structured fields the tests expect.
Input: parse_inventory_line('SKU-1|widget|12|3.5') Output: {'sku': 'SKU-1', 'name': 'widget', 'qty': 12, 'price': 3.5} This input follows the stated rules and produces this output.
Topics: lakebench, python, parsing.
More Python interview questions · All interview problems · Learn data engineering
Interview-style drill: Parse a pipe-delimited inventory record into a structured dictionary.
Parse a delimited inventory line into the structured fields the tests expect.