Insert
Typed shortcut for appending or overwriting JSON rows. Keyed tables route through the write log (KEYED_INSERT_BULK); tables without merge_keys go directly to Delta (NON_KEYED_INSERT). See the Data hub for the full RPC list.
| RPC | HTTP |
|---|---|
Insert | POST /:bucket/tables/:table_name/insert |
gRPC setup —
grpcurl, endpoints, reflection, and field-name casing — is covered once in Conventions → Using gRPC.
Insert
Request
HTTP
curl -sS -X POST "https://k3.dev.dodil.io/kb-prod/tables/events/insert" \
-H "Authorization: Bearer $DODIL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"bucket": "kb-prod",
"tableName": "events",
"rows": [
"{\"id\":1,\"user_id\":\"u-101\",\"occurred_at\":1716840000000000,\"event_type\":\"click\",\"payload\":{\"page\":\"/pricing\"}}",
"{\"id\":2,\"user_id\":\"u-101\",\"occurred_at\":1716840060000000,\"event_type\":\"click\",\"payload\":{\"page\":\"/signup\"}}"
],
"mode": "append"
}'Response
HTTP
{
"rowsWritten": "2",
"version": "0",
"pendingDrain": true
}mode = "overwrite": drops the table contents then writes the rows — bypasses the write log (single Delta commit). Useful for periodic full-table refreshes.
See also
- Execute → INSERT — full strategy reference (
KEYED_INSERT_SINGLE / BULK / FROM_SELECT,NON_KEYED_INSERT,NON_KEYED_INSERT_FROM_SELECT) - Query · Merge · Update · DeleteRows — sibling RPCs
- Core Concepts → WriteStrategy — every routing variant
- CLI Guide —
dodil k3 table insert grpcurlreference — full flag set + reflection-disabled fallbacks