HackerTrans
TopNewTrendsCommentsPastAskShowJobs

ltabb

no profile record

Submissions

DuckDB: Prefix aliases make SQL more readable

duckdb.org
2 points·by ltabb·पिछला वर्ष·0 comments

Malloy 4.0 aims to make a better analytical SQL

malloydata.github.io
5 points·by ltabb·3 वर्ष पहले·2 comments

Data is Rectangular and other Limiting Misconceptions

lloydtabb.substack.com
2 points·by ltabb·3 वर्ष पहले·1 comments

Try Malloy's Fiddle: Sequel to SQL (Built with DuckDB and WASM)

looker-open-source.github.io
2 points·by ltabb·4 वर्ष पहले·1 comments

comments

ltabb
·3 वर्ष पहले·discuss
We're on the fourth major revision of Malloy, a data language aiming to replace analytical SQL. Making something that is simple, complete and understandable is really hard. 'Experimental' is no longer in our description.
ltabb
·3 वर्ष पहले·discuss
In software we express our ideas through tools. In data, those tools think in rectangles. From spreadsheets to the data warehouses, to do any analytical calculation, you must first go through a rectangle. Forcing data through a rectangle shapes the way we solve problems (for example, dimensional fact tables, OLAP Cubes). But really, most data isn’t rectangular
ltabb
·4 वर्ष पहले·discuss
Curious about the Malloy Language? Want to try it out with no install? Check out our new Malloy Fiddle. Malloy Fiddle runs entirely in the browser using #DuckDB and WASM. Malloy Fiddle queries semantic data models. See results as tables, JSON or SQL
ltabb
·4 वर्ष पहले·discuss
If you would like to play with Malloy... You can Fiddle using just a web browser. The Malloy Fiddle uses DuckDB and WASM.

  https://twitter.com/lloydtabb/status/1567671348306264064
ltabb
·4 वर्ष पहले·discuss
Give it a shot. Malloy writes the query in the twitter thread with a single database read. It computes the query, simultaneously at 4 levels of dimensionalization but only touches the disk once. No joins.
ltabb
·4 वर्ष पहले·discuss
Try writing this SQL. Malloy writes SQL you can't (I'm pretty sure of it).

  https://twitter.com/lloydtabb/status/1556287859601985536
ltabb
·4 वर्ष पहले·discuss
We're hoping its more of a 'typescript' but yeah :)
ltabb
·4 वर्ष पहले·discuss
Sorry, the link to the documentation is buried.

https://looker-open-source.github.io/malloy/documentation/la...
ltabb
·4 वर्ष पहले·discuss
Scroll to the bottom of the page. It shows the returned JSON

https://looker-open-source.github.io/malloy/documentation/pa...

Here is the SQL we generate.

https://gist.github.com/lloydtabb/8c144d2dac978dda9bf3ec4d6b...
ltabb
·4 वर्ष पहले·discuss
> What's nest actually doing?

1) Nesting builds nested results (like GraphQL). This is particularly hard to do in SQL but is allows very large complex data sets to be returned in a single query.

https://looker-open-source.github.io/malloy/documentation/la...

For example the dashboard on the page below is a single SQL query:

https://looker-open-source.github.io/malloy/documentation/ex...

> How does aggregate know what function to use?

You can pre-define calculations with 'measure:' or decalre them explicitly in a query.

> where's the windowing

It's missing with a bunch of other things (like union for example). Its coming of course. The goal is that everything represent able in SQL is represent able in Malloy.

> heck does "order by: 2" mean

Same thing as it does in SQL. We try and have reasonable defaults.

https://looker-open-source.github.io/malloy/documentation/la...

> "How is this actually easier?"

The goal here is to be able to create data models that are re-usable and compose-able and verifiable. Yeah, there is a learning curve as there is with anything powerful. There are many things expressible in Malloy that cannot be easily expressed in SQL.
ltabb
·4 वर्ष पहले·discuss
Thanks, that is reasonable feedback. We'll work on updating the documentation.

Here is an example of Malloy solving today's worlde in 50 lines of Malloy

https://looker-open-source.github.io/malloy/documentation/ex...

And here is the equivalent SQL.

https://gist.github.com/lloydtabb/32f46e7ecbb2da1a443d1adbe9...
ltabb
·4 वर्ष पहले·discuss
Here is the quick start.

https://looker-open-source.github.io/malloy/documentation/la...
ltabb
·4 वर्ष पहले·discuss
Actually joins recently landed. Arbitrary patterns and computes aggregates correctly regardless of join patterns.

https://looker-open-source.github.io/malloy/documentation/la...