Skip to Content
We are live but in Staging 🎉

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.

RPCHTTP
DeleteRowsPOST /:bucket/tables/:table_name/delete-rows

gRPC setup — grpcurl, endpoints, reflection, and field-name casing — is covered once in Conventions → Using gRPC.

DeleteRows

Request

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

{ "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