Skip to content

Conversation

@vitiral
Copy link

@vitiral vitiral commented Aug 11, 2023

A lot of this is small grammar fixes, a few changes are slightly larger (but always local) changes to the intent. I've marked the latter with comments to open discussion.


### Reusable Queries
Queries can be introduced into a Malloy model and accessed by name. One benefit is that the
queries are always accurate. Think of a Malloy model as a data function library.
Copy link
Author

@vitiral vitiral Aug 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what One benefit is that the queries are always accurate means but it is neither clear nor can it possibly be accurate 😄

I wish I could have a programming language who's queries are always accurate but then most Data Scientists would probably be out of a job!



However, we in general try to have the "feel" of SQL. We use `()` for structuring instead of `{}` like LookML or JavaScript do, or indentation like Python does. We use `is` and `define` instead of `:` like LookML or `=` like JavaScript. We use SQL words for things (like `join`) where it makes sense.
However try to keep to the "feel" of SQL while incorporating useful syntax from other languages. We use `()` for structuring instead of `{}` (LookML/JavaScript), or whitespace/indentation (Python). When a concept or function is particular to query languages we try to fall back to use SQL words (i.e. `join`, `aggregate`) but do not introduce whitespace syntax (i.e. malloy's `group_by` vs SQL's `GROUP BY`)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of this is trying to improve the general "flow" of the sentence.

The last bit regarding "falling back to SQL words" is inferred from what I've seen of the language and should be confirmed by an expert.



The intention was always that there is some context, command line or editor, which handles a single document with mixed Malloy and SQL, either because they are one merged language, or there is some JSX-like escaping between the contexts.
The intention has always been to allow mixing Malloy and SQL in order to enable incremental improvement of already existing SQL; as well as better facilitate the learning process.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I felt like the reference to JSX/etc was superfluous. The main point (as I see it) is that you should be able to incrementally improve your SQL code.


### … is an expression of empathy towards explorers and explainers of data
The Malloy user is not someone who writes one sentence in Malloy, and then never sees the language again. Malloy is an invitation into a "way" for people who are passionate about decision making based on data, and good decision making is iterative, and ongoing.
The Malloy user is not someone who writes one sentence in Malloy, and then never sees the language again. Malloy is an invitation into a "way" (or "Tao") for people who are passionate about decision making based on data; and good decision making is iterative and ongoing.
Copy link
Author

@vitiral vitiral Aug 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The Tao" literally translated can mean "The way" so there is a pun here that feels like a good way to end a document titled "Tao"

https://en.wikipedia.org/wiki/Tao

[Tao] means a road, path, way;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant