// 0pt.dataset_iceberg_mapping.schema.v1 // // Maps a 0pt dataset to the Iceberg table that carries its canonical lakehouse // write path. `iceberg_table_id` is a REFERENCE into ST0RE's table registry // (IcebergTable.tableId, st0re_iceberg_tables) -- it is not a copy of ST0RE's // table metadata. 0pt does not persist table/catalog/snapshot state of its // own; this row exists only to answer "which Iceberg table does this dataset // write to", per docs/10-lakehouse-decision.md and // docs/ICEBERG_WRITE_BOUNDARY.md. export type DatasetIcebergMappingStatus = "pending" | "active" | "deprecated" | "archived"; export interface DatasetIcebergMapping { dataset_iceberg_mapping_id: string; tenant_id: string; project_id: string; dataset_id: string; /** Reference into ST0RE's table registry (IcebergTable.tableId). Not resolved or duplicated locally. */ iceberg_table_id: string; /** * Reference into ST0RE's namespace registry (LakehouseNamespace.namespaceId, * `/v1/st0re/lakehouse/namespaces`) -- the literal field this task's contract * spec names. Populated from the real namespaceId ST0RE returns when * `IcebergWriteService.mapDatasetToIcebergTable` registers the namespace, * not guessed or derived from the `namespace` name string below. */ namespace_id?: string; /** ST0RE lakehouse namespace NAME the table lives in, carried for convenience/filtering only -- ST0RE remains the source of truth. */ namespace?: string; table_name?: string; mapping_status: DatasetIcebergMappingStatus; /** When this mapping was created/last (re)mapped -- same instant as created_at on first creation; the task spec's literal field name. */ mapped_at: string; mapped_by?: string; correlation_id?: string; created_at: string; updated_at?: string; } export interface CreateDatasetIcebergMappingInput { dataset_iceberg_mapping_id: string; tenant_id: string; project_id: string; dataset_id: string; iceberg_table_id: string; namespace_id?: string; namespace?: string; table_name?: string; mapping_status?: DatasetIcebergMappingStatus; mapped_by?: string; correlation_id?: string; }