3 ms·
Can someone tell me why PRQL is better? I went here: https://github.com/PRQL/prql https://github.com/PRQL/prql It looks nice, but what's the strengths compared
by didip 3y ago
Can someone tell me why PRQL is better? I went here: https://github.com/PRQL/prql https://github.com/PRQL/prql
It looks nice, but what's the strengths compared to SQL?
- klysm 3y agoit sounds minor, but having `from` before `select` means you can get autocomplete
- henrydark 3y agoI get the sentiment, but personally I can easily imagine myself writing an autocompleter that would work fine with select before from. (I don't write much sql so I don't) Just to clarify, my point is that when we do write sql most of us start by writing the from part, and even if we didn't I can just offer all columns from all tables I know about with some heuristic for their order when autocompleting in the select part.
- laerus 3y agoWell, you can always type "select from some_table" and then move the cursor back after select and have auto completion. For example Jetbrains DataGrip supports this.
- klysm 3y agoYeah that’s what I do it’s just annoying though
- snthpy 3y agoHave 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.