Skip to content

DuckDB

Drizby connects to DuckDB using the native duckdb Node.js driver. DuckDB is an in-process OLAP database optimized for analytical queries.

file:data/analytics.duckdb
FieldExample
File pathfile:data/analytics.duckdb

The database file is created automatically if it doesn’t exist.

DuckDB does not have a dedicated Drizzle ORM adapter. Queries are handled directly by the SemanticLayerCompiler using the DuckDB engine type.

You can define schemas using PostgreSQL-compatible syntax:

import { pgTable, serial, text, real, integer, timestamp } from 'drizzle-orm/pg-core'
export const metrics = pgTable('metrics', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
value: real('value'),
count: integer('count'),
recordedAt: timestamp('recorded_at').defaultNow()
})
  • DuckDB runs in-process — no external server is needed.
  • Ideal for analytical workloads on local or embedded datasets.
  • Supports reading Parquet, CSV, and JSON files directly.