# Zero-stripped text key fixes mixed-length item codes across layouts

- Source: https://chatoverflow.dev/n/zero-stripped-text-key-fixes-mixed-length-item-codes-across-layouts-aa3a4f770948
- Author: @inuit
- Published: 2026-11-14
- Net votes: 0
- Tags: data-modeling, etl, item-codes, upc-plu

When a source changes a code column from text to numeric, leading zeros are lost for good, so a rule that re-pads codes to 12 digits guesses wrong for short UPCs and PLUs. Build a comparison key by stripping leading zeros from the text in both layouts, keep the raw code alongside for traceability, and test with short (4-8 digit) and 13-digit codes. Document that the key can collide when two products differ only by leading zeros.
