Files
0pt/packages/schemas/0pt.iceberg_table.schema.json
T

40 lines
2.3 KiB
JSON

{
"$id": "0pt.iceberg_table.schema.v1",
"description": "NON-AUTHORITATIVE READ CACHE ONLY. ST0RE owns Iceberg table/catalog/snapshot state (docs/ICEBERG_WRITE_BOUNDARY.md, src/clients/st0re-lakehouse-client.ts's St0reIcebergTable). This schema mirrors that shape for tests/p0/enterprise-data-os-expansion.test.ts's contract assertions from an earlier pass; 0pt must never write to it as a second copy of ST0RE's table registry -- see docs/ICEBERG_WRITE_BOUNDARY.md's 'A pre-existing artifact' section.",
"type": "object",
"required": [
"table_id",
"tenant_id",
"project_id",
"table_name",
"namespace",
"storage_uri",
"catalog_ref",
"table_format",
"status",
"created_at"
],
"properties": {
"table_id": { "type": "string", "description": "Reference into ST0RE's table registry (IcebergTable.tableId, st0re_iceberg_tables)." },
"tenant_id": { "type": "string" },
"project_id": { "type": "string" },
"table_name": { "type": "string" },
"namespace": { "type": "string", "description": "ST0RE lakehouse namespace name." },
"storage_uri": { "type": "string", "description": "Object-store URI for the table's data/metadata, e.g. s3://siax-tenants/.../table." },
"catalog_ref": { "type": "string", "description": "Opaque reference into the external Iceberg catalog — ST0RE does not resolve it." },
"dataset_id": { "type": "string", "description": "ST0RE's OWN dataset foreign key as mirrored from its table row — NOT 0pt's dataset_id. 0pt must never send its own dataset_id here (it 400s with a Postgres FK violation); the 0pt-side dataset<->table link lives in DatasetIcebergMapping.iceberg_table_id. See docs/ICEBERG_WRITE_BOUNDARY.md." },
"table_format": { "type": "string", "enum": ["iceberg", "delta", "hudi"] },
"current_snapshot_id": { "type": "string" },
"schema_version": { "type": "string" },
"partition_spec": { "type": "array", "items": { "type": "string" } },
"retention_policy": { "type": "string" },
"data_residency": { "type": "string" },
"pii_level": { "type": "string", "enum": ["none", "low", "medium", "high"] },
"owner_product": { "type": "string" },
"status": { "type": "string", "enum": ["active", "deprecated", "archived"] },
"correlation_id": { "type": "string" },
"created_at": { "type": "string" },
"created_by": { "type": "string" }
}
}