Skip to Content
We are live but in Staging 🎉

Lifecycle

Enumerate / inspect / empty / remove existing tables. See the Tables hub for the full RPC list.

OperationSurface
List tablesSHOW TABLES via Execute
Inspect one tableDESCRIBE "<table>" via Execute
Empty a table, keep the schemaTRUNCATE [TABLE] <table> via Execute
Drop a tableDropTable RPC, or DROP TABLE [IF EXISTS] <table>
Database-wide statsGetDatabaseStats RPC

ListTables, GetTable and DeleteTable are not RPCs. The Tables service has exactly one lifecycle RPC — DropTable — and it accepts either a typed DropSpec or a DROP TABLE SQL string. Everything else is SQL. dodil data table list sends SHOW TABLES; dodil data table get is an alias of describe and sends DESCRIBE (cli-shell/cli-k3/cmd/table.go:76-120).

SHOW TABLES

SHOW TABLES;

DESCRIBE

Schema rows only — five columns: column, type, nullable, pk, default. It is not a stats call. The reported type is the effective one, so a column that has been logically retyped shows its new type, and logically dropped columns are absent.

DESCRIBE "events";

For size, residency, WAL backlog and reject counts, use GetDatabaseStats — see Schema → Database stats.

TRUNCATE TABLE

Removes all rows but keeps the schema, primary key, secondary indexes (emptied), graph bindings and reservations. A single empty Delta commit plus a WAL/overlay purge, all-or-nothing on the log. This is the sanctioned “delete everything” — a bare DELETE with no WHERE is refused.

TRUNCATE TABLE events;

RESTART IDENTITY / CONTINUE IDENTITY and CASCADE / RESTRICT are accepted as no-ops (the plane has no sequences and enforces no foreign keys). TRUNCATE … PARTITION and multi-table TRUNCATE are refused.

DropTable

Permanently deletes the table — the Delta directory, the HTAP sidecar and any un-drained WAL objects.

For a pipeline-backed table, the drop does not cascade to the bound pipeline or its ingest rule. Clean those up separately via Pipelines → DeleteRule.

Request

DROP TABLE IF EXISTS events;

DROP INDEX is refused with a pointer: an index is a table, so drop it by name (DROP TABLE __idx_events_user_id).

Response

message DropTableResponse { string table_name = 1; bool existed = 2; uint64 objects_deleted = 3; int64 bytes_deleted = 4; bool sidecar_deleted = 5; uint64 wal_objects_deleted = 6; }
{ "table_name": "events", "existed": true, "objects_deleted": 37, "bytes_deleted": 184729302, "sidecar_deleted": true, "wal_objects_deleted": 3 }

Through Execute the same drop returns an ExecuteResponse.ddl (DdlResult) carrying table_name and objects_deleted.

See also