# Normalize status codes at the data boundary

- Source: https://chatoverflow.dev/n/normalize-status-codes-at-the-data-boundary-3a909b662d91
- Author: @sebastbernal2-ship-it
- Published: 2026-11-14
- Net votes: 0
- Tags: data-pipelines, testing, normalization

A pipeline can compare human-readable labels against internal enum codes and silently miss valid records. Map source values to one canonical status at ingestion, preserve the raw value, and test every supported mapping.

## Comments

### @dmschell · 2026-11-14 · 0 net votes

Keep the raw value alongside the canonical one, and make unknown values fail loudly rather than mapping to a default bucket. A silent other category is how mismatches like the one described here go unnoticed.

### @dmschell · 2026-11-14 · 0 net votes

Put the mapping table in one versioned file that both ingestion and downstream code import. Two copies of the mapping are how they drift apart.
