Tables — API Reference
Package: dodil.k3.tables.v1 · Service: TableService
The Tables surface is 21 RPCs across six functional groups. Two universal entry points worth knowing about up front:
Execute— send a DuckDB SQL string, K3’s planner routes it through the right write or read strategy. The canonical SQL surface — every DDL / DML / SELECT shape goes here.Datashortcuts —Query/Insert/Merge/Update/DeleteRowsare typed RPCs that the planner routes through the same strategies as Execute. Use these when you’d rather pass typed JSON rows + predicates than assemble SQL strings.
Both share the same dispatch logic — pick whichever is ergonomically nicer for your caller.
Sections
| Page | RPCs | Topic |
|---|---|---|
| Tables | CreateTable · CreateTablePipeline · ListTables · GetTable · DeleteTable · AlterTable · DescribeTable · ListPartitions | Table lifecycle — both manual and pipeline-generated modes |
| Data | Query · Insert · Merge · Update · DeleteRows | Structured row operations (no SQL strings) |
| Execute (SQL) | Execute · Materialize | Planner-driven SQL — every DDL / DML / read shape with examples |
| Maintenance | Optimize · Vacuum · Compact · Restore · History | File compaction, version cleanup, time travel, commit log |
| Templates | ListTemplates | Browse Scriptum templates filtered to warehouse-compatible ones |
| Engine | EnableEngine · GetEngine · DisableEngine | Per-bucket engine lifecycle — auto-enabled on CreateBucket, rarely touched |
Wire conventions
| HTTP request body | HTTP query / path | gRPC | |
|---|---|---|---|
| Field names | camelCase (pbjson) | snake_case (e.g. table_name, before_version) | as in .proto |
| Enums | wire-name strings ("FRESHNESS_STRONG", "WRITE_STRATEGY_KEYED_UPDATE") | — | enum |
int64 | JSON strings | strings | int64 |
| All fields | always emitted (no defaults dropped) | — | — |
Endpoint roots
| Endpoint | Use |
|---|---|
https://k3.dev.dodil.io (staging) · https://k3.dodil.io (prod) | HTTP |
k3-grpc.dev.dodil.io:443 (staging) · k3-grpc.dodil.io:443 (prod) | gRPC |
Auth: bearer JWT in Authorization. See Conventions.
Truthful response shape
Write responses (InsertResponse / MergeResponse / UpdateResponse / DeleteRowsResponse / ExecuteWriteResult) return:
rows_written— count of writes the table accepted at response time. For keyed writes this is the write-log append count; for non-keyed writes it’s the direct Delta row count.pending_drain—truewhen the write landed in the write log and waits on the compactor to materialize into Delta.falsewhen the write went directly to Delta.version— Delta version after the write.0when the write is still pending drain (Delta unchanged until next compaction).
Per-row insert/update/delete classification is not knowable synchronously for write-log routes — that breakdown emerges after the compactor MERGE and is exposed via DescribeTable’s last_drain_* fields.
See also
- Core Concepts — every type signature
- Quickstart — end-to-end in 5 minutes
- SQL Compatibility — DuckDB dialect + statement-shape reference
- CLI Guide —
dodil k3 table/enginecommands