liveBook · Manning

Orphaned file

As explained in Architecting an Apache Iceberg Lakehouse

A physical data or metadata file that is no longer referenced by the table's valid metadata state.

An orphaned file is a data or metadata file written to storage but never committed to a valid Iceberg snapshot. It does not affect query correctness, but it increases storage costs and complicates audits. section 11.3.2

Manage orphaned files as part of table maintenance:

  • Run Iceberg’s remove_orphan_files procedure to reclaim storage from failed or incomplete writes. section 11.3.2
  • Retain a configurable age threshold; the default is commonly 10 days, with a 24-hour minimum, to avoid deleting files from in-flight or recently failed operations. section 11.3.2
  • Coordinate orphan cleanup with compaction and snapshot expiration when implementing end-to-end deletion maintenance. section 11.2.5
Figure 11.4 With object versioning, if an object is corrupted or lost, you can revert to the previous version of the object. Here, the object is a data or metadata file in storage.

Object versioning provides a recovery layer for data or metadata files if storage objects are corrupted or lost. section 11.3.2

How Architecting an Apache Iceberg Lakehouse covers it

How deep it goes
Explains failed-write origins, query-safety implications, cleanup ordering, and age safeguards without detailing procedure internals.
Examples
Uses failed writes, remove_orphan_files, age thresholds, compaction, and snapshot expiration as operational examples.
What it assumes
Assumes familiarity with Iceberg data files and snapshots while explaining orphaned files from the failed-write scenario.
What you can do after
Operate/configure orphan cleanup with retention safeguards and coordinate it with related Iceberg maintenance procedures.
How it connects
Connects orphaned files with Iceberg snapshots, compaction, snapshot expiration, metadata, and object versioning.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting an Apache Iceberg Lakehouse. The section links point to the parts of the book it draws on.