https://github.com/PRQL/prql Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Customer Stories + White papers, Ebooks, Webinars + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. {{ message }} PRQL / prql Public * Notifications * Fork 163 * Star 7.5k PRQL is a modern language for transforming data -- a simple, powerful, pipelined SQL replacement prql-lang.org License Apache-2.0 license 7.5k stars 163 forks Activity Star Notifications * Code * Issues 146 * Pull requests 14 * Discussions * Actions * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Security * Insights PRQL/prql This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 14 branches 32 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/P] Use Git or checkout with SVN using the web URL. [gh repo clone PRQL/p] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @pre-commit-ci @max-sixty pre-commit-ci[bot] and max-sixty chore: pre-commit autoupdate (#3035) ... 7ddea9a Jul 25, 2023 chore: pre-commit autoupdate (#3035) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> 7ddea9a Git stats * 2,211 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .cargo build: Disable prql-elixir on Mac (#1902) February 19, 2023 19:47 .config test: Check local links in markdown (#2636) May 26, 2023 03:07 .devcontainer devops(devcontainer): add sqlite3 and duckdb cli (#2830) June 16, 2023 05:28 .github chore: Bump versions to 0.9.2 (#3070) July 25, 2023 20:24 .vscode docs: Update links to new vscode extension (#1114) November 5, 2022 23:44 bindings chore: Bump versions to 0.9.2 (#3070) July 25, 2023 20:24 crates chore: Bump versions to 0.9.2 (#3070) July 25, 2023 20:24 grammars feat: Add remaining 0.9.0 items for Lezer grammar (#2875) June 20, 2023 04:12 packages/snap chore: move crates in prql-compiler to crates/ July 20, 2023 20:02 web fix: playground csv loading (#3076) July 25, 2023 20:54 .dockerignore build: Add .dockerignore with target (#1277) December 15, 2022 12:39 .gitattributes tweak: prevent minified files from cluttering git grep results (#2978 ) July 14, 2023 21:24 .gitignore ci: Improve code coverage action (#2877) June 20, 2023 16:18 .markdownlint-cli2.yaml chore: Add markdownlint exception (#1386) January 1, 2023 20:51 .mega-linter.yaml build: disable problematic megalinter rules (#3055) July 25, 2023 12:07 .pre-commit-config.yaml chore: pre-commit autoupdate (#3035) July 25, 2023 22:00 .prettierignore test: Ignore *.html in prettier until go-template is fixed (#3067) July 25, 2023 19:31 .prettierrc.yaml test: Ignore *.html in prettier until go-template is fixed (#3067) July 25, 2023 19:31 .sqlfluff build: tweak megalinter config for sql (#2349) March 30, 2023 10:50 CHANGELOG.md docs: Changes from prettier (#3073) July 25, 2023 20:18 Cargo.lock chore: Bump versions to 0.9.2 (#3070) July 25, 2023 20:24 Cargo.toml chore: Bump versions to 0.9.2 (#3070) July 25, 2023 20:24 LICENSE Add License January 8, 2022 01:21 README.md build: Make packages releasable (#3065) July 25, 2023 19:04 Taskfile.yml devops: install binary cargo-binstall via Taskfile (#2932) July 1, 2023 13:23 _typos.toml build: Make packages releasable (#3065) July 25, 2023 19:04 bacon.toml build: Use a feature for integration tests (#2899) June 21, 2023 21:41 rust-toolchain.toml build: pin the rust-toolchain version to 1.68.2 (#2725) June 4, 2023 20:21 View code PRQL Current Status - April 2023 Get involved Explore Repo organization Contributors README.md PRQL Website Playground Language Docs Discord GitHub CI Status GitHub contributors Stars Pipelined Relational Query Language, pronounced "Prequel". PRQL is a modern language for transforming data -- a simple, powerful, pipelined SQL replacement. Like SQL, it's readable, explicit and declarative. Unlike SQL, it forms a logical pipeline of transformations, and supports abstractions such as variables and functions. It can be used with any database that uses SQL, since it compiles to SQL. PRQL can be as simple as: from tracks filter artist == "Bob Marley" # Each line transforms the previous result aggregate { # `aggregate` reduces each column to a value plays = sum plays, longest = max length, shortest = min length, # Trailing commas are allowed } Here's a fuller example of the language; from employees filter start_date > @2021-01-01 # Clear date syntax derive { # `derive` adds columns / variables gross_salary = salary + (tax ?? 0), # Terse coalesce gross_cost = gross_salary + benefits_cost, # Variables can use other variables } filter gross_cost > 0 group {title, country} ( # `group` runs a pipeline over each group aggregate { # `aggregate` reduces each group to a value average gross_salary, sum_gross_cost = sum gross_cost, # `=` sets a column name } ) filter sum_gross_cost > 100_000 # `filter` replaces both of SQL's `WHERE` & `HAVING` derive id = f"{title}_{country}" # F-strings like Python derive country_code = s"LEFT(country, 2)" # S-strings allow using SQL as an escape hatch sort {sum_gross_cost, -country} # `-country` means descending order take 1..20 # Range expressions (also valid here as `take 20`) For more on the language, more examples & comparisons with SQL, visit prql-lang.org. To experiment with PRQL in the browser, check out PRQL Playground. Current Status - April 2023 PRQL is being actively developed by a growing community. It's ready to use by the intrepid, either with our supported integrations, or within your own tools, using one of our supported language bindings. PRQL still has some minor bugs and some missing features, and probably is only ready to be rolled out to non-technical teams for fairly simple queries. Here's our current Roadmap and our Milestones. Our immediate focus for the code is on: * Building out the next few big features, including types and modules. * Ensuring our supported features feel extremely robust; resolving any priority bugs. We're also spending time thinking about: * Making it really easy to start using PRQL. We're doing that by building integrations with tools that folks already use; for example our VS Code extension & Jupyter integration. If there are tools you're familiar with that you think would be open to integrating with PRQL, please let us know in an issue. * Making it easier to contribute to the compiler. We have a wide group of contributors to the project, but contributions to the compiler itself are quite concentrated. We're keen to expand this; #1840 for feedback. Get involved To stay in touch with PRQL: * Follow us on Twitter * Join us on Discord * Star this repo * Contribute -- join us in building PRQL, through writing code (send us your use-cases!), or inspiring others to use it. * See the development documentation for PRQL. It's easy to get started -- the project can be built in a couple of commands, and we're a really friendly community! Explore * PRQL Playground -- experiment with PRQL in the browser. * PRQL Book -- the language documentation. * dbt-prql -- write PRQL in dbt models. * Jupyter magic -- run PRQL in Jupyter, either against a DB, or a Pandas DataFrame / CSV / Parquet file through DuckDB. * pyprql Docs -- the pyprql documentation, the Python bindings to PRQL, including Jupyter magic. * PRQL VS Code extension * prql-js -- JavaScript bindings for PRQL. Repo organization This repo is composed of: * prql-compiler -- the compiler, written in rust, whose main role is to compile PRQL into SQL. It also includes prqlc, the CLI. * web -- our web content: the Book, Website, and Playground. * bindings -- bindings from various languages to prql-compiler. It also contains our testing / CI infrastructure and development tools. Check out our development docs for more details. Contributors Many thanks to those who've made our progress possible: Contributors About PRQL is a modern language for transforming data -- a simple, powerful, pipelined SQL replacement prql-lang.org Topics data sql pipeline Resources Readme License Apache-2.0 license Code of conduct Code of conduct Activity Stars 7.5k stars Watchers 44 watching Forks 163 forks Report repository Releases 29 0.9.2 Latest Jul 25, 2023 + 28 releases Used by 29 * @richb-hanover * @Hulxv * @ClickHouse * @sadroad * @JPMoresmau * @sarvex * @masonforest + 21 Contributors 56 * @max-sixty * @pre-commit-ci[bot] * @aljazerzen * @dependabot[bot] * @eitsupi * @not-my-profile * @richb-hanover * @vanillajonathan * @mklopets * @charlie-sanders * @kiibo382 + 45 contributors Languages * Rust 83.0% * JavaScript 4.2% * CSS 3.4% * HTML 2.5% * C# 1.3% * PHP 1.3% * Other 4.3% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.