“New LookML” is best described as a refresh of the LookML syntax. “YAML LookML”'s syntax was, well, YAML, a generic data-serialization language created long before Looker came into existence. New LookML borrows a lot from the YAML syntax, making it easy for existing LookML developers to learn and transition to it. At the same time, it does away with a lot of the pitfalls and inconsistencies of YAML that make LookML more difficult to learn for new users and more error-prone even for experienced LookML developers.
But even more importantly than the changes to syntax, transitioning off of YAML to a native language designed specifically for LookML’s needs has allowed the Looker IDE experience to be expanded into something much more dynamic, interactive, and helpful for LookML developers.
The two primary goals of new LookML can therefore be summarized as follows:
- Provide a syntax that—while familiar to existing LookML developers—resolves the various aspects of YAML that often trip people up.
- Power a rich and assistive IDE to make LookML development an easy and delightful experience.
Let’s take a closer look at why these goals were set and how new LookML reaches them.
YAML was designed with human-readability in mind, which is one of the reasons it was used for LookML originally. It provides all of the constructs LookML needs: key-value pairs, lists, nested structures, etc. But it’s not perfect. There are three primary aspects of YAML that lead to confusion which the alternative syntax of new LookML resolves.
YAML uses indentation — Mess up indentation by a level or two, and now all of a sudden your code means something completely different. It’s often hard to tell at a glance what the issue is, especially when the YAML is still valid but doesn’t make sense as LookML.
New LookML uses curly braces — New LookML solves the indentation-based hierarchy confusion by doing away with it entirely. Blocks of LookML are clearly designated with a simple set of curly braces.
YAML has multiple syntaxes to say the same thing — Strings can be quoted or not, there are many word options for booleans, and arrays look very different depending on whether you want each item on a new line or not. This makes the syntax more complex and therefore more difficult for new LookML developers to learn.
New LookML is consistent — Strings are always quoted, booleans are always
no, and lists are always defined with square brackets and comma-separated items. There is one and only one right way to define these things.
YAML doesn’t know about LookML things — YAML provides syntax, but nothing more. It has no concept of defining a thing and referencing it somewhere else, as with fields, views, and joins. This means it can’t help you as you write LookML.
New LookML is LookML — New LookML is an actual language—not just a syntax. So there are inherent rules and meaning behind the things you define with it. New LookML understands all the constructs of LookML, like field definitions and what the valid parameters are when defining a dimension. This allows it to power a full-featured IDE experience that both enables learning for newcomers to LookML and enhances the productivity of experienced developers.
With YAML LookML, you basically get a plain text editor to develop in. It can’t offer any assistance, because as mentioned above, it doesn’t understand the LookML meaning behind any of the things you’re writing.
The enhanced IDE built atop new LookML, on the other hand, offers a much more guided and helpful development experience. This is where the real magic of new LookML shines! With new LookML, the IDE auto suggests LookML parameters and field names, checks for errors, and provides documentation—all on the fly as you type!
Check out the following posts to learn more about new LookML and the new IDE features and how to get started converting your YAML LookML projects to the new syntax so you can take advantage of it all: