grpc/proto/skade_katalog.proto
syntax = "proto3";
// The nordisk-native catalog wire. One-to-one with the Iceberg-REST endpoints
// skade-katalog-rest serves, but over binary protobuf / HTTP-2 — the fast wire
// no mainstream Iceberg catalog ships. Table metadata rides as the canonical
// on-disk Iceberg metadata JSON document (`metadata_json`); requirements and
// updates ride as their canonical Iceberg JSON encoding (one string per item,
// the same wire form REST bodies carry), handed straight to
// `RedbCatalog::commit_table`.
package skade.katalog.v1;
service Catalog {
rpc Config (ConfigRequest) returns (ConfigResponse);
rpc ListNamespaces (ListNamespacesRequest) returns (NamespaceList);
rpc CreateNamespace (CreateNamespaceReq) returns (Namespace);
rpc NamespaceExists (NamespaceIdentMsg) returns (Exists);
rpc GetNamespace (NamespaceIdentMsg) returns (Namespace);
rpc ListTables (NamespaceIdentMsg) returns (TableIdentList);
rpc CreateTable (CreateTableReq) returns (LoadTableResult);
rpc LoadTable (TableIdentMsg) returns (LoadTableResult);
rpc TableExists (TableIdentMsg) returns (Exists);
rpc DropTable (TableIdentMsg) returns (Empty);
rpc CommitTable (CommitTableReq) returns (CommitTableResult);
}
message Empty {}
message Exists { bool exists = 1; }
message ConfigRequest { string warehouse = 1; }
message ConfigResponse {
map<string, string> defaults = 1;
map<string, string> overrides = 2;
}
message Namespace {
repeated string levels = 1;
map<string, string> properties = 2;
}
message NamespaceIdentMsg { repeated string levels = 1; }
message ListNamespacesRequest { repeated string parent = 1; }
message NamespaceList { repeated Namespace namespaces = 1; }
message CreateNamespaceReq {
repeated string levels = 1;
map<string, string> properties = 2;
}
message TableIdentMsg {
repeated string namespace = 1;
string name = 2;
}
message TableIdentList { repeated TableIdentMsg tables = 1; }
message CreateTableReq {
repeated string namespace = 1;
string name = 2;
string schema_json = 3; // serde_json of iceberg::spec::Schema
string location = 4; // optional; empty string = none
}
message LoadTableResult {
string metadata_location = 1;
bytes metadata_json = 2; // canonical on-disk Iceberg metadata document
map<string, string> config = 3;
}
message CommitTableReq {
repeated string namespace = 1;
string name = 2;
repeated string requirements_json = 3; // each = canonical Iceberg JSON of a TableRequirement
repeated string updates_json = 4; // each = canonical Iceberg JSON of a TableUpdate
}
message CommitTableResult {
string metadata_location = 1;
bytes metadata_json = 2;
}