{
  "id": 682687,
  "title": "Schema Versioning When Your Extraction Changes",
  "url": "https://urgent.news/2026/08/12/schema-versioning-when-your-extraction-changes",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-12T17:21:38.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/multigrid/schema-versioning-when-your-extraction-changes-1n0g"
  },
  "original_language": "en",
  "account": "When the extraction schema changes, it is important to handle versioning carefully to avoid issues with comparing rows that were derived from different schemas or models. Store the schema version, document ID, prompt version, model ID, and extracted timestamp alongside every extraction record. This allows you to track the exact inputs and transformations applied to each data point.\n\nThere are three types of schema changes: structural (renaming fields, changing types, moving fields), additive (adding new fields), and semantic (changing the meaning of existing fields). Semantic changes are the most dangerous because they can make old data incompatible with new data without any obvious errors. To handle semantic changes, treat records on either side of the change as separate populations until you can compare them.\n\nAdditive changes can often be handled by backfilling the missing data using the raw response, which stores the model's full output. Semantic changes cannot be handled in this way and require re-extracting the affected records. Keep a record of every prompt version, as changes to prompts can also affect the output distribution. Version prompts in the same way as schema versions, and store them in version control alongside the code.\n\nIf a schema change requires re-extraction, do so in a shadow table and compare the old and new versions before cutting over. Extracted data is derived data, so each row represents the output of a function of four inputs: the document, schema, prompt, and model. Any change to one of these inputs means the rows are no longer comparable. Keeping all four identifiers with each record allows you to track changes accurately and avoid unexpected issues down the line.",
  "summary": "The schema you shipped in March is not the schema you will want in September. Unlike a database migration, some changes to an extraction schema cannot be applied to existing rows by any transform, and the difference is worth knowing before you have four million of them. Extracted data is derived data A row in your extractions table is the output of a function of four inputs: the document, the…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}