Skip to Content
We are live but in Staging 🎉

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 Execute for everything Data doesn’t cover — full SQL flexibility, joins, CTEs, window functions, CTAS, DDL.

RPCHTTPRoutes through (planner strategy)Page
QueryPOST /:bucket/tables/_queryQueryStrategy — see Execute → Read strategiesQuery
InsertPOST /:bucket/tables/:table_name/insertWRITE_STRATEGY_KEYED_INSERT_BULK (or NON_KEYED_INSERT for tables without merge_keys)Insert
MergePOST /:bucket/tables/:table_name/mergeWRITE_STRATEGY_MERGE_ROWSMerge
UpdatePOST /:bucket/tables/:table_name/updateWRITE_STRATEGY_KEYED_UPDATE (or NON_KEYED_UPDATE if the predicate doesn’t match merge_keys — ⚠️ WAL-bypass)Update
DeleteRowsPOST /:bucket/tables/:table_name/delete-rowsWRITE_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_matched actions. rows_written counts source rows (pre-drain).
  • Update — column → value map + SQL WHERE predicate. 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