4 ms·
Preql – a new relational programming language, that compiles to SQL
- jstrong 6y agothis looks pretty promising. what I am most excited about is the way that the syntax minimizes repetition. from the examples[1], this is pandas: tips[(tips['size'] >= 5) | (tips['total_bill'] > 45)] this is preql: tips[size >= 5 or total_bill > 45] repeating the names over and over again like in the pandas example (would also be true in sql, probably moreso) drives me nuts. I've honestly dreamed of a nice query syntax that cuts that down. in contrast, influxdb recently released v2.0 with a new query language, flux. this is the top example in the docs: from(bucket:"telegraf/autogen") |> range(start:-1h) |> filter(fn:(r) => r._measurement == "cpu" and r.cpu == "cpu-total" ) |> aggregateWindow(every: 1m, fn: mean) so much needless typing!! `r._measurement`? `from(bucket:"table_name")` is considerably worse than `select .. from table_name`, which isn't great. this code is write once code for exploring data, and my brain is constantly ahead of my fingers. thank you preql, will give this a close look. [1] https://preql.readthedocs.io/en/latest/comparison.html https://preql.readthedocs.io/en/latest/comparison.html