﻿# Feature units in schema metadata: verify that exports preserve the measurement contract

Feature units in schema metadata: verify that exports preserve the measurement contract. A practical data-quality guide with failure mechanisms, validation steps, acceptance evidence and primary references.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/dq-feature-units-schema-metadata-roundtrip/
Language: en

A table stores measurement units in column metadata. A format conversion keeps numeric values and column names but drops the units, letting a downstream process interpret the feature on the wrong scale.

## The mechanism that changes the example

Value equality is weaker than measurement equality. Units, reference frames and normalization conventions may be necessary to interpret a number even when the physical storage type is unchanged.



## Define the comparison boundary

Check field metadata and the external semantic schema independently. A format may preserve a numeric column while a particular conversion tool drops metadata that the physical format could have represented.

Use a calibration example with the same numerical value under two deliberately different units. Equality of stored numbers must fail the semantic comparison when the units differ. If conversion is intended, retain the conversion rule and verify the expected changed number instead of demanding byte equality.

Include the consumer in the round trip. Metadata present in the file is ineffective if the feature builder ignores it and applies a default scale. A sidecar contract should be bound to the exact release and field identity, and the reader should reject an absent or incompatible unit rather than silently guessing from a column name.

## A constructed test case

Round-trip a measured feature through a format that does not carry the producer metadata automatically. A consumer must recover the approved unit from an explicit contract or reject interpretation; identical floating values alone do not complete the handoff.

## A reproducible validation procedure

Round-trip a fixture with deliberately distinct units through every release format. Compare schema metadata and the consumer contract. Require a versioned sidecar schema when a format or tool cannot preserve the required metadata.

Include an unchanged control and a deliberately invalid case. Verify that the checker distinguishes them before testing the complete release.

Exercise the actual preparation path, including later serialization and reload. Limit retained diagnostic content to the evidence required for this comparison.

## Evidence needed for acceptance

Acceptance includes values, unit identity and the consumer interpretation of a known calibration example.

## Containment and recovery

A declared unit can itself be wrong; source calibration and semantic review remain independent obligations.

Quarantine an invalid release candidate or use an explicit partial-release rule. Preserve the last approved artifact and record corrections without silently rewriting historical inputs.

## Interpretation and references

Implementation references: [Arrow data types and schema metadata](https://arrow.apache.org/docs/python/data.html); [Apache Iceberg table specification](https://iceberg.apache.org/spec/).

This is a proposed engineering validation, not an executed Retrivium benchmark. Documentation specifies interfaces; dataset acceptance needs its own evidence and must be repeated after relevant dependency changes.

## Related reading

Continue with [Frictionless Table Schema: validate logical values before feature building](/journal/data-guide-frictionless-table-schema/); [Documents to Markdown or JSON: preserve evidence provenance for RAG](/journal/document-markdown-json-provenance/). These guides supply adjacent context; the decision in this article remains the specific example-preservation check above.
