Data — API Reference
Package: dodil.k3.tables.v1 · Service: TableService
The Data RPCs are typed shortcuts for row-level operations. Pass JSON rows / predicates / match-columns and K3’s planner routes the operation through the same strategies as a SQL Execute — they’re interchangeable.
When to use Data vs Execute: use Data when you’d rather hand the API typed inputs than assemble SQL strings (avoids quoting / templating / injection concerns). Use
Executefor everything Data doesn’t cover — full SQL flexibility, joins, CTEs, window functions, CTAS, DDL.
| RPC | HTTP | Routes through (planner strategy) | Page |
|---|---|---|---|
Query | POST /:bucket/tables/_query | QueryStrategy — see Execute → Read strategies | Query |
Insert | POST /:bucket/tables/:table_name/insert | WRITE_STRATEGY_KEYED_INSERT_BULK (or NON_KEYED_INSERT for tables without merge_keys) | Insert |
Merge | POST /:bucket/tables/:table_name/merge | WRITE_STRATEGY_MERGE_ROWS | Merge |
Update | POST /:bucket/tables/:table_name/update | WRITE_STRATEGY_KEYED_UPDATE (or NON_KEYED_UPDATE if the predicate doesn’t match merge_keys — ⚠️ WAL-bypass) | Update |
DeleteRows | POST /:bucket/tables/:table_name/delete-rows | WRITE_STRATEGY_KEYED_DELETE (or NON_KEYED_DELETE — ⚠️) | DeleteRows |
Sub-pages
- Query — SELECT against a single target with optional broadcast JOINs (
lookup_tables) and freshness control (EVENTUAL/STRONG/OLTP_ONLY). - Insert — append or overwrite JSON rows. Routes through the write log for keyed tables, direct-to-Delta for tables without
merge_keys. - Merge — upsert via match-columns with
when_matched/when_not_matchedactions.rows_writtencounts source rows (pre-drain). - Update — column → value map + SQL
WHEREpredicate. Keyed predicates route through the write log; non-keyed predicates bypass the log (Delta-direct, WAL-bypass risk). - DeleteRows — predicate-driven delete. Keyed → tombstones in the write log; non-keyed → Delta-direct.
See also
- Execute — full DuckDB SQL surface; the canonical reference for write/read strategies + DDL
- Tables — table lifecycle (both creation modes)
- Core Concepts → WriteStrategy — every routing variant
- SQL Compatibility — DuckDB dialect, statement shapes
- CLI Guide —
dodil k3 table query / insert / merge / update / delete-rows