Skip to Content
We are live but in Staging 🎉

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.

RPCHTTP
InsertPOST /:bucket/tables/:table_name/insert

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

Insert

Request

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

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