Apache Iceberg · Schema

TableMetadata

TableMetadata schema from Apache Iceberg REST Catalog API

ACIDAnalyticsApacheData LakeLakehouseOpen SourceTable Format

Properties

Name Type Description
format-version integer
table-uuid string
location string
last-updated-ms integer
next-row-id integer A long higher than all assigned row IDs; the next snapshot's first-row-id.
properties object
schemas array
current-schema-id integer
last-column-id integer
partition-specs array
default-spec-id integer
last-partition-id integer
sort-orders array
default-sort-order-id integer
encryption-keys array
snapshots array
refs object
current-snapshot-id integer
last-sequence-number integer
snapshot-log object
metadata-log object
statistics array
partition-statistics array
View JSON Schema on GitHub

JSON Schema

rest-catalog-open-api-table-metadata-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/apache-iceberg/refs/heads/main/json-schema/rest-catalog-open-api-table-metadata-schema.json",
  "title": "TableMetadata",
  "description": "TableMetadata schema from Apache Iceberg REST Catalog API",
  "type": "object",
  "properties": {
    "format-version": {
      "type": "integer",
      "minimum": 1,
      "maximum": 3
    },
    "table-uuid": {
      "type": "string"
    },
    "location": {
      "type": "string"
    },
    "last-updated-ms": {
      "type": "integer",
      "format": "int64"
    },
    "next-row-id": {
      "type": "integer",
      "format": "int64",
      "description": "A long higher than all assigned row IDs; the next snapshot's first-row-id."
    },
    "properties": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "schemas": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Schema"
      }
    },
    "current-schema-id": {
      "type": "integer"
    },
    "last-column-id": {
      "type": "integer"
    },
    "partition-specs": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/PartitionSpec"
      }
    },
    "default-spec-id": {
      "type": "integer"
    },
    "last-partition-id": {
      "type": "integer"
    },
    "sort-orders": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SortOrder"
      }
    },
    "default-sort-order-id": {
      "type": "integer"
    },
    "encryption-keys": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/EncryptedKey"
      }
    },
    "snapshots": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Snapshot"
      }
    },
    "refs": {
      "$ref": "#/components/schemas/SnapshotReferences"
    },
    "current-snapshot-id": {
      "type": "integer",
      "format": "int64"
    },
    "last-sequence-number": {
      "type": "integer",
      "format": "int64"
    },
    "snapshot-log": {
      "$ref": "#/components/schemas/SnapshotLog"
    },
    "metadata-log": {
      "$ref": "#/components/schemas/MetadataLog"
    },
    "statistics": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StatisticsFile"
      }
    },
    "partition-statistics": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/PartitionStatisticsFile"
      }
    }
  },
  "required": [
    "format-version",
    "table-uuid"
  ]
}