in

PRQL: Pipelined Relational Query Language

PRQL: Pipelined Relational Query Language

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;

{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

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

What do you think?

Written by TeknologiAi

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

Show HN: RealAboutInstagram – a replica highlighting harmful strategies

Show HN: RealAboutInstagram – a replica highlighting harmful strategies

I don’t think I could survive The Banished Vault’s space management without its physical manual