https://github.com/wvlet/wvlet
A flow-style query language for SQL engines
https://github.com/wvlet/wvlet
dbt duckdb query-language sql trino
Last synced: about 2 months ago
JSON representation
A flow-style query language for SQL engines
- Host: GitHub
- URL: https://github.com/wvlet/wvlet
- Owner: wvlet
- License: apache-2.0
- Created: 2024-08-23T23:21:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-19T08:40:50.000Z (9 months ago)
- Last Synced: 2025-06-19T09:39:58.489Z (9 months ago)
- Topics: dbt, duckdb, query-language, sql, trino
- Language: Scala
- Homepage: https://wvlet.org/wvlet/
- Size: 17.7 MB
- Stars: 138
- Watchers: 2
- Forks: 8
- Open Issues: 73
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-java - Wvlet
README

[](https://deepwiki.com/wvlet/wvlet)
Wvlet, pronounced as weave-let, is a new cross-SQL flow-style query language for functional data modeling and interactive data exploration. Wvlet works with various types of SQL-based database engines, including [DuckDB](https://duckdb.org/), [Trino](https://trino.io/), [Hive](https://hive.apache.org/), etc.
- [Documentation](https://wvlet.org/wvlet/)
- [Milestones](https://github.com/wvlet/wvlet/milestones)
- [Project Roadmap](https://github.com/orgs/wvlet/projects/2)


## Why Wvlet?
Wvlet queries (saved as .wv files) provide a natural way to describe data processing pipelines, which will eventually be compiled into a sequence of SQL queries. While SQL is a powerful language for processing data, its syntax often does not match the semantic order of data processing. Let's see the following example: The syntactic order of SQL's SELECT ... statements mismatches with the actual data flow inside the SQL engines (cited from _[A Critique of Modern SQL And A Proposal Towards A Simple and Expressive Query Language (CIDR '24)](https://www.cidrdb.org/cidr2024/papers/p48-neumann.pdf)_):

For overcoming this shortcoming of SQL, Wvlet starts from a table scan statement `from ...`, and the result can be streamlined to the next processing operators like `where`, `group by`, `select`, etc., as if passing table values through [a pipe](https://en.wikipedia.org/wiki/Pipeline_(Unix)) to the next operator:
```sql
from (table)
where (filtering condition)
...
where (more filtering condition can be added)
group by (grouping keys, ...)
where (group condition can be added just with where)
select (columns to output)
order by (ordering columns...)
limit (limiting the number of output rows)
```
With this flow style, you can describe data processing pipelines in a natural order to create complex queries. You can also add operators for testing or debugging data in the middle of the query. This flow syntax is gaining traction and has been adopted in Google's SQL to simplify writing SQL queries. For more details, see _[SQL Has Problems. We Can Fix Them: Pipe Syntax In SQL (VLDB 2024)](https://research.google/pubs/sql-has-problems-we-can-fix-them-pipe-syntax-in-sql/)_.
## Key Features
- **Flow-style syntax**: Write queries in the natural order of data processing
- **Multi-database support**: Works with DuckDB, Trino, Hive, and more
- **Interactive REPL**: Explore data interactively with auto-completion
- **Type-safe queries**: Catch errors at compile time with schema validation
- **Modular queries**: Organize and reuse queries as functions
## Contributors
Many thanks to everyone who has contributed to our progress:
[](https://github.com/wvlet/wvlet/graphs/contributors)