The partner file loaded fine and the values are wrong

A partner drops a CSV each morning. Today's file loaded without error and every downstream job succeeded, but the country column contains what look like postcodes and the amount column is empty.

beginner · Ingestion

What you would do first

Answer before revealing anything. The value of the exercise is entirely in committing to a diagnosis you can be wrong about.

  1. 1Look at the raw file rather than at the loaded table. The header row will show the new column, and comparing it with yesterday's header shows the shift.
  2. 2Check whether the loader maps by position or by name, and whether it validates the header at all.
  3. 3Establish the blast radius: which loads since the change are affected, and which downstream models consumed them.
  4. 4Check whether any values happened to survive the shift — a column that shifted into a compatible type is the dangerous case, because it looks plausible.

What is actually going on

The trap

The fix that looks right. Read it even if you got the answer — especially then.

Fix today's load by adjusting the column offsets in the loader. It works until the partner changes the file again, the offsets are now a second undocumented contract, and the days already loaded with shifted values stay in the warehouse looking entirely normal.

Resolution