Bulk write routes
Write batches and native bulk frames keep up with high-volume device feeds.
Durable history for every device and the current state of each one, in one engine.
The problem
A fleet never stops talking. Readings arrive in bursts, and the easy path, buffer them in a queue and batch them into a warehouse, trades freshness for durability and gives you a second system to run.
Meanwhile the questions your operators ask are about right now: what is this device doing, which devices report a fault, what changed since the last reading. Scanning the whole history to answer them is the wrong shape.
You want the history kept durably, one current row per device, and a way to follow changes the moment they commit.
Architecture
Readings land in a compressed columnar table with indexes on the columns you filter by; device status lives in a table keyed by device; STREAM SELECT follows that status table live.
Readings arrive through SQL, write batches or native bulk frames, and each one is in the write-ahead log before it is acknowledged.
History stays compact: codecs such as DoubleDelta and ZSTD are declared per column on a COLUMNAR table.
One row per device, always current, in an UPSERT table; a POSTINGS index answers “which devices report this status” directly.
Your operators see the current rows first, then each change as it commits, with STREAM SELECT.
Examples
CREATE TABLE balances ( chain_id UINT16 NOT NULL, address STRING NOT NULL, token STRING NOT NULL, amount UINT256 NULL, updated_at DATETIME64(3, 'UTC') NULL, balance_index UINT128 NULL, balance_version UINT64 NULL, transfer_count UINT64 NULL, last_transfer_at DATETIME64(3, 'UTC') NULL, activity_index UINT128 NULL, PRIMARY KEY (chain_id, address, token), ATTRIBUTE GROUP holding (amount, updated_at, balance_index, balance_version) VALID BY (balance_index) REVISION BY (balance_version), ATTRIBUTE GROUP activity (transfer_count, last_transfer_at, activity_index) VALID BY (activity_index))MODE VERSIONEDSHARD BY (address) SHARDS AUTOORDER BY (chain_id, address, token);CREATE TABLE transfers ( chain_id UINT16 NOT NULL, token STRING NOT NULL, sender STRING NOT NULL, recipient STRING NOT NULL, amount UINT256 NOT NULL, transferred_at DATETIME64(3, 'UTC') NOT NULL, _index UINT128 NOT NULL, INDEX transfers_ts (transferred_at) USING MINMAX SCOPE HISTORY GRANULE 8192)MODE APPENDSHARD BY (token) SHARDS AUTOPARTITION BY MONTH(transferred_at)ORDER BY (chain_id, token, _index)STORAGE PROFILE COLUMNAR;STREAM SELECT chain_id, token, SUM(amount) AS volume, COUNT(*) AS transfersFROM transfersGROUP BY chain_id, token;The examples use the same two tables on every page. See the SQL reference for full syntax.
Capabilities
Write batches and native bulk frames keep up with high-volume device feeds.
Writes are acknowledged after the write-ahead log has persisted them.
One row per device, always the latest, in an UPSERT table.
Per-column codecs keep history compact; MINMAX and POSTINGS indexes keep it quick to filter.
Follow a table without polling, with STREAM SELECT.
Device history and current state share one catalog and one SQL surface.
Learn more
Run a node and point your device feed at it.