News for hackers. Stuff that matters.
Re:PRQL a simple, powerful, pipelined SQL replacement by usgroup on Friday December 30, 2022 @03:04AM (#34182987)
That PRQL is not composable makes it —- so far as I can see —- mostly an alternative syntax.

What I’d personally really appreciate is the ability to split queries up into individuality testable and reusable parts. I think that’d be game changing because suddenly large sql code bases become manageable.

Re:PRQL a simple, powerful, pipelined SQL replacement by trollied on Friday December 30, 2022 @03:35AM (#34183148)
Use CTEs (Common Table Expressions, otherwise known as "with clauses").

This actually solves some of their gripes & reasoning for creating PRQL in the first place.

Re:PRQL a simple, powerful, pipelined SQL replacement by ernestoo on Friday December 30, 2022 @03:30AM (#34183120)
Try dbt for that
Re:PRQL a simple, powerful, pipelined SQL replacement by snthpy on Friday December 30, 2022 @04:36AM (#34183488)
Composability is definitely a major design goal and I think we are getting close to that. Watch this space!
Re:PRQL a simple, powerful, pipelined SQL replacement by silon42 on Friday December 30, 2022 @05:12AM (#34183661)
I wonder how you plan to handle the query optimizer which often behaves unpredictably as queries get more complicated.
Re:PRQL a simple, powerful, pipelined SQL replacement by thelastbender12 on Friday December 30, 2022 @04:41AM (#34183517)
You might enjoy the FunSQL library; SQL verbs are represented using regular Julia objects and you pipeline them together to build bigger queries. A key difference to other SQL builders is that you assemble a tree of "tabular operations" instead of a SQL syntax tree.

https://github.com/MechanicalRabbit/FunSQL.jl