Skip to main content
Wvlet

Open source · Apache 2.0 · Built for AI agents too

Write queries
in the order data flows

Wvlet is a flow-style query language with its own columnar query engine. Run queries in-process on the JVM, as a native binary, in Node.js, or in the browser, or compile them to SQL for DuckDB, Trino, Snowflake, and Hive.

revenue.wvwvlet
from orders
where o_orderdate >= '1997-01-01'
group by o_orderpriority
agg _.count as orders, o_totalprice.sum as revenue
order by revenue desc
limit 5
wvlet engine · 5 rowsduckdb · trino · snowflake
o_orderpriorityordersrevenue
4-NOT SPECIFIED781109,207,683.80
1-URGENT744104,483,591.84
3-MEDIUM700100,134,880.58
2-HIGH71599,758,813.31
5-LOW69393,976,264.81
select o_orderpriority, count(*) as orders, sum(o_totalprice) as revenue
from orders
where o_orderdate >= '1997-01-01'
group by o_orderpriority
order by revenue desc
limit 5
Built-in engine
  • Wvlet engineJVM · Node.js · Browser · Native
Compiles to SQL for
  • DuckDB
  • Trino
  • Snowflake
  • Hive

Why Wvlet

Redesigning 50-year-old SQL
for modern data analytics

SQL was born in the 1970s. Its syntax order doesn't match how data flows through a query, which makes deeply nested queries hard to read and debug, even for experts, and the standard has no way to reuse, test, or debug queries. Wvlet modernizes SQL with software engineering practices built in.

  1. 01

    Syntax that follows the data

    Start from from, then pipe the table through where, group by, and select. Run any prefix of a query in the REPL to check intermediate results.

  2. 02

    Reusable, composable queries

    Define data models and functions once, then build on them across queries and pipelines.

  3. 03

    Debugging and testing built in

    Insert debug or test between any two lines without restructuring the query.

  4. 04

    Bring your SQL along

    Wvlet reads SQL too: .sql files go through the same compiler as .wv files, and wvlet to_wvlet converts existing SQL into flow-style queries, so you can adopt Wvlet one query at a time.

Read: Wvlet: Redesigning 50-Year-Old SQL for Modern Data Analytics →

wv — interactive REPL
Wvlet REPL demo query

Choice of engines

One size doesn't fit all.
Choose the engine that fits.

No single engine fits every workload. An in-process columnar engine suits local files and apps, a GPU suits heavy joins and aggregations, and a warehouse suits data that already lives there. Wvlet gives you all of these choices in one language, so each workload can run where it runs best.

“One size fits all”: an idea whose time has come and gone.
Michael Stonebraker & Uğur Çetintemel, ICDE 2005

Columnar CPU engine

Vectorized, multi-threaded execution over Parquet, Iceberg, JSON, and CSV, planned by a cost-based optimizer. Steady-state speed on par with DuckDB on TPC-H and TPC-DS at scale factor 10; see the benchmark.

  • JVM
  • Native

Browser & Node.js

The same engine compiled to JavaScript. The playground runs queries in your browser with no server.

  • Browser
  • Node.js

GPU acceleration

Experimental

Offload joins and aggregations to the GPU while the rest of the plan stays on the CPU. A subtree the device can't run, or that fails on it, runs on the CPU instead.

  • NVIDIA
  • cudf

SQL engines

When the data lives in a warehouse, compile your query to that engine's SQL dialect and run it there.

  • DuckDB
  • Trino
  • Snowflake
  • Hive

Embedded

Call Wvlet from your own code

Wvlet is also a library. Compile queries inside your application with the Python and TypeScript SDKs, or call the C-compatible native library from other languages, then run the SQL on the engine your app already uses.

  • Pythonpip install wvlet
  • TypeScript / JavaScriptnpm install wvlet
  • C APIlibwvlet native library
Language bindings →
app.pypython
import duckdb
from wvlet import compile

sql = compile("""
from 'sales.parquet'
group by region
agg amount.sum as total
""", target="duckdb")

duckdb.connect().execute(sql).fetchdf()

What you get

Queries as reusable building blocks

01

Analyze As You Write

The flow-style query enables you to analyze data as you write queries for interactive data exploration. Use our interactive REPL or write queries in VS Code with full syntax highlighting.

02

Ready for AI Agents

Wvlet ships docs for AI agents and a bundled agent skill, so coding agents can write, run, and debug Wvlet queries for you.

03

Functional Data Modeling

Wvlet enables to build functional (i.e., reusable and composable) data models, which can be shared and extended to build reliable data pipelines as in dbt.

04

Cross-SQL Engine Support

Wvlet consumes the differences between SQL engines, such as DuckDB, Trino, Hive, etc. You can choose the SQL engine that fits the data size and the expected query performance.

05

Extensible

Wvlet is extensible with table-value functions or compiler-plugins to add your custom query rewrite rules.

06

Free and Open Source

We believe in the power of open-source software and want to help you to exploit more values from your data and queries written with Wvlet. Wvlet is free to use and open-sourced under the Apache License, Version 2.0 (APL2) license.