Lifecycle
Enumerate / inspect / empty / remove existing tables. See the Tables hub for the full RPC list.
| Operation | Surface |
|---|---|
| List tables | SHOW TABLES via Execute |
| Inspect one table | DESCRIBE "<table>" via Execute |
| Empty a table, keep the schema | TRUNCATE [TABLE] <table> via Execute |
| Drop a table | DropTable RPC, or DROP TABLE [IF EXISTS] <table> |
| Database-wide stats | GetDatabaseStats RPC |
ListTables,GetTableandDeleteTableare not RPCs. TheTablesservice has exactly one lifecycle RPC —DropTable— and it accepts either a typedDropSpecor aDROP TABLESQL string. Everything else is SQL.dodil data table listsendsSHOW TABLES;dodil data table getis an alias ofdescribeand sendsDESCRIBE(cli-shell/cli-k3/cmd/table.go:76-120).
SHOW TABLES
SQL
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.
SQL
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
SQL
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
- Create —
CreateTable·CreateTablePipeline - Schema —
AlterTableand database stats - Maintenance → RESTORE — roll a table back to an earlier version
- Core Concepts → Table — type signature + both creation modes
- CLI Guide —
dodil data table list / describe / delete