6 ms·
Have a look at the online playground: https://prql-lang.org/playground/ https://prql-lang.org/playground/ It starts you off with a very well documented example
by snthpy 3y ago
Have a look at the online playground: https://prql-lang.org/playground/ https://prql-lang.org/playground/
It starts you off with a very well documented example. Try commenting out one of the lines and watch how the SQL on the RHS changes.
Each line is a separate transformation and follows a logical flow from top to bottom. IMHO it combines the best of SQL and pipelined DSLs like dplyr, LINQ, Kusto, to name just a few. An advantage over things like Pandas is that it still generates SQL so you can take your compute to where your data is (Cloud DWH) and benefit from query optimisation whereas Pandas has to download all your data first and then follows an eager execution model which doesn't benefit from query optimisation. Polars fixes a lot of data but still has the data transfer probleam and it is not universal whereas PRQL can compile to different dialects of SQL like DuckDB, Postgres, BigQuery, MS SQL Server, ...
For a more in-depth overview, watch this:
PRQL: A Modern Language for Data Transformation (11 min)
https://youtu.be/t4-f9vjq2lc?si=Qx3k5oAq5A9THU0G https://youtu.be/t4-f9vjq2lc?si=Qx3k5oAq5A9THU0G
Disclaimer: I'm a PRQL contributor and the presenter of that talk.