learning-it by example

#307 Forward deployed engineer interviews 6.2 min

Schema Drift: Map a Customer's Data and Catch Changes

A guessed fix for a changed export made two totals 100 times too big, with no error.

1. What does the drift check in the schema mapping video do with a new export?
2. In the schema drift demo, how many problems did the drift check report for the April export, and for March?
3. When loading a customer's CSV export, why is the tempting fix of assuming decimal commas dangerous?
4. In the mapping file, what happens when a value will not convert, for example a date that is not year-month-day?
5. How does the video describe the rename hint, such as 'maybe renamed to customer'?

Practice only: nothing is saved and no score counts towards anything. Each answer comes with the reason.

  1. Read the drift report

    Copy the code folder first. Run python run.py. For the four April problems, write down which of the three kinds of change each one is: a renamed column, a new column, or a changed format. You should see 0 problems for March and 4 for April.

    A hint

    Dates and amounts are changes in format.

  2. Undo the rename

    In exports.py, in the first line of APRIL, change customer to cust_name. Predict how many problems April has now and which line disappears, then run python run.py. With this change April has 3 problems, and both the missing column line and the hint are gone.

    A hint

    The check only looks for names that the mapping expects.

  3. Fix the dates in one row

    In exports.py change the first April date 03/04/2026 to 2026-04-03. Predict the count for order_date, then run it. With this change it says 4 of 5 values in order_date do not parse. Why does the report still flag order_date when one row now parses?

    A hint

    The check counts each value that fails to convert.

  4. Test the tempting fix on good data

    In exports.py change the April amounts "1.250,00", "80,00" and "310,00" to 1250.00, 80.00 and 310.00 without quotes. Predict what lenient_totals gives now, then run python run.py. With this change the amount problem disappears from the report, but the tempting fix now prints totals [125000.0, 8000.0, 4225.0, 31000.0, 1999.0]. Compare them with the expected line.

    A hint

    The fix removes every dot, so a normal decimal point is lost.

These tasks are for you to try on your own machine. Nothing is checked or saved.

What this does not show

Tiny made-up exports and mapping, five rows each. The rename hint is a spelling guess that a person must confirm. The check only counts values that fail to convert: a value that converts to the wrong number (1.250 meant as 1,250) passes. A program cannot settle day-first against month-first dates. Sources are vendor pages, not standards.

Up next in Forward deployed engineer interviews

More in Forward deployed engineer interviews

All Forward deployed engineer interviews videos

Related videos