DeleteRows
Predicate-driven delete. Keyed predicates (matching the table’s merge_keys) write one tombstone per affected key into the write log; the compactor materializes them as a Delta DELETE on drain. Non-keyed predicates delete directly from Delta (WAL-bypass risk). See the Data hub for the full RPC list.
| RPC | HTTP |
|---|---|
DeleteRows | POST /:bucket/tables/:table_name/delete-rows |
gRPC setup —
grpcurl, endpoints, reflection, and field-name casing — is covered once in Conventions → Using gRPC.
DeleteRows
Request
HTTP
Keyed delete:
curl -sS -X POST "https://k3.dev.dodil.io/kb-prod/tables/events/delete-rows" \
-H "Authorization: Bearer $DODIL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"bucket": "kb-prod",
"tableName": "events",
"predicate": "id = 1 AND user_id = '\''u-101'\''"
}'Non-keyed delete (⚠️ Delta-only):
curl -sS -X POST "https://k3.dev.dodil.io/kb-prod/tables/events/delete-rows" \
-H "Authorization: Bearer $DODIL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"bucket": "kb-prod",
"tableName": "events",
"predicate": "occurred_at < TIMESTAMP '\''2025-01-01 00:00:00'\''"
}'Response
HTTP
{
"tableName": "events",
"predicate": "id = 1 AND user_id = 'u-101'",
"version": "0",
"rowsWritten": "1",
"pendingDrain": true
}Keyed delete resolves matching keys via SELECT pk FROM target WHERE predicate, then writes one tombstone per key into the write log. The compactor materializes them as a Delta DELETE on drain.
See also
- Execute → DELETE — full strategy reference (
KEYED_DELETE / KEYED_RANGE_DELETE / KEYED_DELETE_FROM_SUBQUERY,NON_KEYED_DELETE) - Query · Insert · Merge · Update — sibling RPCs
- Maintenance → Compact — drain the write log before non-keyed deletes
- Core Concepts → WriteStrategy — every routing variant
- CLI Guide —
dodil k3 table delete-rows grpcurlreference — full flag set + reflection-disabled fallbacks