Skip to content

Systems and records

Dataset stable identifiers validation: eight tests on OurAirports

By SourceX Editorial · Updated

10 sections

Short answer

Dataset stable identifiers validation proves that every key means the same thing in every file, in the next release and in the buyer's reader. Run on OurAirports releases from 2025-10-28 and 2026-10-28, eight tests found no changed or reused airport key among 83,746 retained airports, yet 2,622 airports changed an external code such as IATA or ICAO, and pandas defaults turned 40,661 NA codes into missing values.

Checklist

Dataset stable identifiers

This page covers dataset stable identifiers validation: eight tests on OurAirports.Illustrative

Key takeaways

  • Validate identity, not bytes: a checksum or a schema check confirms a file loads, not that a key still names the same record.
  • OurAirports kept its numeric id and its ident unchanged for all 83,746 airports present in both releases, and the ident copies in three other files matched in every row.
  • External codes are not keys: 2,622 retained airports changed an ICAO, IATA, GPS or local code within the year, and 16 IATA codes moved to a different airport.
  • The reader belongs to the delivery: pandas 3.0.5 defaults read the code NA, used for North America and Namibia, as missing in 40,661 identifier cells.
  • Deletions arrived without a list: 46 airport ids disappeared between releases, detectable only by comparing the two.

What does dataset stable identifiers validation have to prove?

It has to prove three things about every identifier in a delivery: that it points to the same record in every file of the package, that it still points to the same record in the next release, and that it reaches the buyer's own reader unchanged. A file that loads, a schema that validates and a checksum that matches prove none of the three.

A checksum proves the bytes arrived as sent. It says nothing about whether the supplier regenerated keys before export, whether a copy of a code in a child table went stale, or whether the buyer's dataframe library quietly turns a country code into a missing value. Each of those failures yields a file that passes every structural check and still breaks joins, deletion requests and evaluation splits.

Two existing pages cover how to construct record IDs and join keys, and how to keep IDs stable through redaction. This page covers the acceptance test a buyer runs on what actually arrives: an identifier register, eight tests, and their results on a public dataset at two pinned commits, so anyone can rerun the method line for line.

Which identifiers does one delivery really carry?

More than the one column labeled id. Before testing anything, list every column that identifies or points to something and give it a role, because each role fails in a different way and needs a different test.

OurAirports, a public-domain set of airports, runways, navigation aids and radio frequencies published as daily CSV files on GitHub, is a compact example. Its data dictionary says the numeric airport id stays persistent even if the airport code changes, names ident as the key for interoperability with other datasets, and keeps id as the internal primary key. One airport can therefore appear under six identifiers, and four files point to it in two different ways.

Use these six roles as the first column of an identifier register:

  • Surrogate key: an opaque number minted once, such as airports.id. Test that it is unique, never reused and present in the next release unless a removal is recorded.
  • Interoperability code: a readable key meant for joining with other datasets, such as ident. Test that it stays attached to the same surrogate from release to release.
  • Reference copy: a code repeated beside a numeric reference, such as airport_ident next to airport_ref in runways.csv, airport-frequencies.csv and airport-comments.csv. Test that the copy equals the parent's current value in every row.
  • Code-only reference: a pointer with no surrogate behind it, such as navaids.associated_airport. Test that it resolves, and treat it as fragile, since a renamed code breaks it without an error.
  • External code: an identifier someone else assigns, such as ICAO, IATA, GPS and local airport codes. Test how often it changes and whether it moves between records.
  • Code list value: a short code from a reference table, such as iso_country, iso_region and continent. Test that it resolves and that it reaches the buyer's reader intact.

Eight tests run on two OurAirports releases a year apart

The matrix below is the asset: eight tests, the rule each one applies, and its result on OurAirports commits 7d46a58 (2025-10-28) and 6112986 (2026-10-28), both published at 02:53 UTC. Release A holds 83,792 airports and release B holds 86,293. The script reads every value as text and runs no code from the repository.

Read the result column as evidence about this dataset only. The clean rows show what a passing delivery looks like; the flagged rows show failures that no schema check or checksum would raise.

Eight tests run on two OurAirports releases a year apart
TestRule as runOurAirports resultA failure means
1. Key uniquenessairports.id all digits and unique; ident unique, exact and case-folded0 duplicates and 0 non-digit ids in either releaseTwo records share one identity and joins multiply rows
2. Reference copies agreeNumeric reference resolves and its ident copy equals the airport's ident0 of 95,206 rows differ in release B (runways, frequencies, comment id columns)A child table was exported from an older state
3. Code-only references resolvenavaids.associated_airport found in airports.ident7,375 of 7,375 resolve in both releasesPointers lose their target silently
4. Carry-overEvery release A id is in release B unless a removal is listed83,746 kept, 2,547 added, 46 removed with no removal listDeleted records stay invisible to the buyer
5. Same key, same recordEach ident attached to the same id in A and B0 idents changed and 0 moved to another airportHistory joins to the wrong record
6. External code driftICAO, IATA, GPS and local codes compared for retained ids2,622 airports changed a code; 16 IATA and 8 ICAO codes moved to another airportJoins on outside codes cross records over time
7. Default reader survivalText-only read compared with pandas 3.0.5 read_csv defaults40,661 identifier cells became missing, every one the code NAKeys vanish inside the buyer's notebook
8. Spreadsheet-sensitive shapesIdents shaped like 1E2; all-digit codes with a leading zero13 idents such as 1E2; 525 unquoted region codes such as 02A spreadsheet can rewrite keys when the file opens
A grid of five identifier types against three tests, across files, across a year and in a default reader: tested cells show zero problems except 46 airport ids removed without a list, 2,622 airports with a changed external code and 40,661 code values lost in the reader, 13 of them navaid idents; two cells are marked not run.
OurAirports releases of 2025-10-28 and 2026-10-28; counts from the article's scripts.

What passed: a year with no changed or reused airport key

Every test of the dataset's own keys passed. All 83,746 airports present in both releases kept the same ident, no ident moved to a different airport, and the ident copies in the runway, frequency and comment id columns matched their parent airport in every row: 92,966 rows in release A and 95,206 in release B.

That result has a cause a buyer can ask any supplier about. The repository's README says contributors cannot update the internal ident themselves and must file a problem report instead, so the key changes only through a controlled path. Expect a delivery whose keys anyone with source-system access can edit to fail test 5.

The one gap is deletion. Forty-six airport ids in release A are absent from release B, 29 of them small airports and 12 heliports, and the repository holds no removal list or tombstone file, only the current CSV files. A buyer who keeps release A's runways and loads release B's airports finds 2 runway rows whose airport no longer exists, and can learn why only by asking.

Where codes moved: external identifiers are labels, not keys

The codes other organizations assign moved far more than the dataset's own keys. Of the 83,746 retained airports, 2,622, or 3.1 percent, changed at least one of their ICAO, IATA, GPS or local codes between the two releases.

Most of those changes filled in or emptied a code: 1,246 airports gained an ICAO code and 775 lost a local code, for example. The dangerous changes are reassignments, where a code held by exactly one airport, of all airports in each release, belongs to a different airport a year later. That happened to 8 ICAO codes, 16 IATA codes, 232 GPS codes and 157 local codes. A buyer joining last year's delivery to this year's on IATA code would attach the history of 16 airports to the wrong airport, and no error would appear.

Two more results argue against external codes as join keys. The interoperability key itself drifts from the ICAO code: in release B, 833 of the 10,655 airports with an ICAO code have an ident that differs from it, up from 332 of 9,282 in release A. And local codes are not unique even within one release: in release B, 1,271 local code values are shared by 2,770 airports. Join deliveries on the surrogate, and keep external codes as attributes with their own change history.

The reader is a delivery artifact: how NA became missing 40,661 times

An identifier is stable only if it survives the software that reads it. Read with pandas 3.0.5 and no arguments, release B lost 40,661 identifier values: every cell holding the two-letter code NA became a missing value.

The cause is documented. The pandas input and output guide lists NA among the strings it treats as missing by default, alongside N/A, NULL, null and None. OurAirports uses NA as the continent code for North America and as Namibia's country code, so the default read blanked the continent of 39,829 airports, the country of 303 Namibian airports, 13 navigation-aid idents and Namibia's own row in countries.csv. The W3C CSV on the Web metadata vocabulary takes the opposite default: unless a null value is declared, only the empty string counts as null.

Spreadsheets bring their own rewrites. Microsoft documents automatic data conversion settings in Excel that strip leading zeros from numeric text and turn digits around the letter E into scientific notation. OurAirports has 13 airport idents shaped like 1E2, and 525 region local codes such as 02 that regions.csv writes without quotes; pandas kept all of them as text because those columns also hold letters, but a spreadsheet with those conversions switched on could rewrite them. The test is to load the delivery in the buyer's actual reader, with its actual settings, and compare every key column with a text-only read.

Acceptance checklist for manifests, records and supporting files

Run these checks on every delivery, in this order, and keep the delivery out of training storage until each passes or carries a written exception. Tests 1 to 8 cover the records; the items below extend them to the manifest and the supporting files a delivery ships with.

At a glance

Acceptance checklist for manifests, records and supporting files

Checklist · 9 items

  1. Identifier register first: every key, reference and code column, its role from the six above, and its declared type, which for every identifier is text.
  2. Manifest to records: every record ID the manifest lists exists in the records, every record appears in the manifest, and counts match file by file.
  3. Version labels: the release identifier in the manifest, the record files and the data card is the same string.
  4. Reference copies: wherever a code is repeated beside a numeric reference, the copy equals the parent's current value.
  5. Supporting files: every attachment, evidence file or label file names a record ID that exists in this release.
  6. Carry-over: every ID from the previous release is present again or listed in a removal file with a coded reason.
  7. Meaning: no ID or interoperability code points to a different record than in the previous release unless a crosswalk file says so.
  8. Reader survival: key columns read in the buyer's tool equal a text-only read, with null tokens declared explicitly.
  9. Failure handling: send the supplier the failing IDs and the rule each broke rather than a summary, fix the pipeline step that caused it, then rerun every test.

0 of 9 ticked. Tick each item as you go.

What this test cannot show

It compares two snapshots of one well-kept dataset. Changes made and reverted between 2025-10-28 and 2026-10-28 are invisible, the 46 removals may include merged duplicates that a removal list would have explained, and OurAirports ships no manifest, so the manifest checks were not run on it.

The reader test covers one library at one version with default settings; other tools keep other default null lists. And a passing result proves consistency, not correctness: an id can stay stable for years while describing the wrong airport.

Writing identifier tests into a data request

A buyer can make these tests part of the request instead of a dispute after delivery: name the key columns, ask for a removal list and a crosswalk for any changed key, and state the reader the files must survive. Pair them with the redaction rules on the persistent record identifiers page and the key construction guidance on the stable record IDs page.

SourceX looks for companies that already hold the records a buyer describes rather than selling from an inventory, and the request form is where a buyer spells out what the data must cover, how much of it, in which language and file format, by when and under what license; identifier tests and the intended reader fit in that same description. No records move until the company supplying them has agreed the scope and terms and signed, so the tests can be settled before a first file is sent.

Methods note: commits, counting rules and reproduction

Data: the OurAirports open-data repository on GitHub, partial clone, files read with git show at commit 7d46a58a2b657b1a8239eeea16a08977a2316a1c (release A, 2025-10-28) and commit 61129867339deebc81b8ed7534f501b08d921a0c (release B, 2026-10-28); both commits were made at 02:53 UTC. Scripts: xs0927_id_stability.py and xs0927_reader_test.py, with their outputs, kept for recount; they only read CSV text and run nothing from the repository. Checked 2026-10-28.

Rules as applied: every field is stripped of surrounding whitespace and decoded as UTF-8 with any byte-order mark removed (none was present). An airport id counts as valid when it is all digits and is compared as an integer. Idents are compared as exact, case-sensitive strings, with case-folded collisions reported separately (none). Empty code values are ignored. A code is reassigned when it is held by exactly one airport, of all airports in each release, and the two airport ids differ; counts are per column, so a code that is both a GPS and a local code counts once in each. A reference copy differs when its text is not identical to the parent airport's ident. A navigation-aid link resolves when its non-empty associated_airport value exactly matches an airport ident. The 2 orphaned runway rows come from joining release A's runway rows to release B's airports on airport_ref. An ident counts as shaped like scientific notation when it is digits, the letter E in either case, then digits. A region local code counts as unquoted when the raw line of regions.csv writes that field as bare digits starting with 0. The 2,622 figure counts retained airports with any difference in the four code columns, including a code filled in or emptied.

Reader test: release B read once with Python's csv module as text and once with pandas 3.0.5 read_csv and no arguments; a non-empty text value counts as lost when the pandas value is missing and as altered when it differs after treating an integer-valued number as equal to its digits (none were altered). Region local codes count as leading-zero codes when they are all digits, longer than one character and start with 0; all 525 are also written without quotes. Only the two identifier columns of airport-comments.csv were kept and used, because the file also holds contributor nicknames, and no data file was saved after the run.

Frequently asked questions

Is a matching checksum enough to accept a dataset delivery?

No. A checksum proves the file arrived exactly as the supplier sent it, including any keys the supplier regenerated or any stale codes it copied. Pair it with key tests: uniqueness, agreement of reference copies, carry-over against the previous release and survival in the reader the buyer will use.

Can two releases of a dataset be joined on IATA or ICAO codes?

Not safely. Between the OurAirports releases of 2025-10-28 and 2026-10-28, 16 IATA codes and 8 ICAO codes that were each held by one airport ended up on a different airport. Join on the dataset's surrogate key and keep external codes as attributes with their own history.

Why did pandas turn country codes into missing values?

pandas treats a fixed list of strings as missing by default, and the list includes NA, which OurAirports uses for North America and for Namibia. Read identifier columns with keep_default_na set to False, declare the null tokens you actually mean, and compare the result with a text-only read.

What should a supplier send when an identifier has to change?

A crosswalk file that maps each old identifier to its new one, a removal file that lists identifiers that left with a coded reason, and a release label that matches across the manifest, records and data card. Without them a buyer can detect a change only by diffing two releases, and cannot tell a correction from an error.

How often should identifier checks run?

On every delivery, including corrections and partial refreshes, because one export taken from an older system state is enough to break reference copies. The checks need only the delivered files and the previous release, so they can run before anything reaches training storage.

Sources

  • OurAirports open-data CSV files (public domain), read at commits 7d46a58 (2025-10-28) and 6112986 (2026-10-28) for every count on this page; the README says contributors cannot change the internal ident themselves. Source
  • The OurAirports data dictionary defines the persistent numeric id, the ident used for interoperability, and the ICAO, IATA, GPS and local code columns. Source
  • The pandas input and output guide (v3.0.5) lists the strings read_csv treats as missing by default, including NA, N/A, NULL, null and None, and how keep_default_na overrides them. Source
  • The W3C CSV on the Web metadata vocabulary sets the empty string as the default null value and defines primary and foreign key checks for validators. Source
  • Microsoft documents Excel's automatic data conversion settings, including removing leading zeros and converting digits around the letter E to scientific notation. Source
  • SourceX sources datasets on request rather than from stock, and buyers share scope, volume, language, format, timing and licensing needs. Source
  • On SourceX's process page, the supplying company approves the scope and terms and signs before any data is delivered. Source

Tell us what data you need

Share scope, volume, format, timing and licensing needs. Datasets are sourced on request.

See if your company qualifies