Serverless DuckDB on GCP. Submit SQL or your own code; DuckLess runs it in your project
on a right-sized machine (Cloud Batch VM with local SSD for spill, or Cloud Run Jobs for small
jobs), reads and writes GCS with the job's own credentials (no HMAC keys), then tears it down.
Nothing runs between jobs. Jobs read Parquet, CSV, JSON, Excel and
BigQuery tables, and
write BigQuery tables; optional
DuckLake tables on a Cloud SQL catalog, and
Agent Skills for coding agents.
Each ended job shows what it cost
at list prices, and -m autosizes a job
from the memory its previous runs used.
Status: v0.9, young and tested on real projects. Changes are listed in the
GitHub Releases; the
benchmarks have the measurements behind the design.
Quick start
uv tool install duckless # or: pip install duckless
duckless init --project my-project --region europe-west1
# prints the lines to put in .envrc (DUCKLESS_PROJECT, DUCKLESS_BUCKET, DUCKLESS_SA, DUCKLESS_IMAGE)
duckless preflight --machine n2-highmem-32 --spot
duckless run job.sql --machine n2-highmem-32 --spot
duckless run job.sql --machine auto # sized from the job's previous runs
duckless exec --image <your-image> --machine n2-highmem-16 -- dbt build
duckless status <job-id> # state, metrics, cost
duckless list # recent jobs and what they cost
duckless logs <job-id> --follow
duckless result <job-id>
duckless destroy --project my-project # removes what init created
duckless init is optional. It applies the Terraform module shipped with each release
(duckless/terraform) through Infrastructure Manager: handy to start in five
minutes. Teams that keep their infrastructure as code call the same module from their own Terraform
and CI/CD instead, with their deployment identity, and never run init:
SQL (.sql): ${VAR} placeholders come from the job env (DUCKLESS_BUCKET, --env K=V).
Python (.py): from duckless_runtime import connect gives a DuckDB connection with GCS auth,
spill on local SSD, memory and threads sized to the VM.
Write to GCS in parallel: COPY … TO 'gs://…' (FORMAT parquet, PER_THREAD_OUTPUT, FILE_SIZE_BYTES '256MB')
is 7-8x faster than the single-writer default (~900 MB/s vs ~110 MB/s on 32 vCPU).
Vectorize Python logic: a row-wise Python UDF runs at ~8k rows/s on one thread; use an
Arrow UDF over numpy (type="arrow") or SQL.