SQL console
Read-only DataFusion SQL over the warehouse, through the Timelake reader.
Read-only DataFusion SQL over the warehouse, through the Timelake reader.
@timelake/client, a WebAssembly build of the reader. It answers time-series queries (latest values, ranges, buckets) without a server-side engine. Arbitrary SQL needs the engine: run the explorer locally with the timelake CLI, or query the same tables from DuckDB.import { Lake } from "@timelake/client"
const lake = new Lake(process.env.TIMELAKE_URL!)
const readings = lake.table("tsbs.readings")
await readings.latest({ series: [1, 2, 3] })
await readings.range({ series: 7, from: "2026-01-03T12:00:00Z", to: "2026-01-03T13:00:00Z" })
await readings.bucket({ series: 7, every: "1h", agg: { velocity: ["avg", "max"] } })See Querying and Quick start.