Readable data pipelines for every database.
RockQL is an open-source query language and compiler for writing database queries as readable top-to-bottom pipelines and compiling them into standard SQL.
from employees
filter salary > 50_000
derive yearly_salary = salary * 12
sort {-yearly_salary}
take 10
SELECT
*,
salary * 12 AS yearly_salary
FROM employees
WHERE salary > 50000
ORDER BY yearly_salary DESC
LIMIT 10;
Write the flow. Generate the SQL.
RockQL is at the compiler-foundation stage. The first implementation includes:
from, filter, select, derive, sort, and take.compile, check, ast, and format CLI commands.The language and APIs are experimental until the v1.0 compatibility policy is published.
git clone https://github.com/Sayanthrock-Developer/ROCKQL.git
cd ROCKQL
cargo install --path compiler/rockql-cli
Compile a file:
rockql compile query.rockql --target postgres
Compile stdin:
echo "from users | filter active == true | take 10" \
| rockql compile --target sqlite
Validate syntax:
rockql check query.rockql
Print the AST:
rockql ast query.rockql
Format source:
rockql format query.rockql
rockql format query.rockql --write
from orders
filter status == "completed"
select customer_id, amount
derive tax = amount * 0.18
sort {-amount}
take 20
Supported transformations:
fromfilterselectderivesorttakeBoth newline pipelines and |-separated pipelines are accepted.
compiler/
├── rockql-ast/ Shared syntax model
├── rockql-parser/ Source parser and diagnostics
├── rockql-sql/ SQL dialect generator
└── rockql-cli/ Cross-platform command-line interface
Planned components include the resolver, relational IR, optimiser, formatter crate, WebAssembly bindings, browser playground, Android app, desktop app, language server, Tree-sitter grammar, and VS Code extension.
RockQL source
↓
Lexer / parser
↓
Abstract Syntax Tree
↓
Name and type resolver
↓
Relational intermediate representation
↓
Query optimiser
↓
SQL dialect generator
↓
Formatted SQL
Early RockQL versions focus on querying and transforming data. Database administration, migrations, write operations, cloud credential storage, team collaboration, paid AI services, and complex optimisation are intentionally out of scope.
RockQL interfaces use charcoal and near-black surfaces, white primary text, muted supporting text, a restrained electric-blue or violet accent, rounded surfaces, clean monospaced code areas, subtle glass layers, and strong contrast without dashboard clutter.
Licensed under the Apache License 2.0.
RockQL is an independent implementation. Third-party source code must retain its original licence, copyright notices, and required attribution.