LookML

Komal Agrawal
2 min readDec 6, 2022

LookML (Looker Modeling Language) generates abstracted SQL and provides a modeling layer between the database and the user. It is Looker’s proprietary language that provides an abstraction layer for SQL databases.

Specifically, LookML is a language for describing dimensions, aggregates, calculations, and data relationships in a SQL database. Looker uses a model written in LookML to construct SQL queries against a particular database. It creates the layer between that SQL database and how the business user interacts with it.

As such, it defines many different things, like how to join tables, how to define custom tables, how to define fields from the database and the logic for new fields.

Overview of LookML structures

The hierarchy of LookML is structured using the following objects:

  • Projects, which are libraries of LookML code. Because Looker uses Git for version control, a best practice is for each project to map 1:1 with a Git repository. A project is composed of one or more models.
  • A model is a set of Explores by business area or need. An Explore is a set of pre-joined views for business-user analysis. Each model contains one or more Explores.
  • A view in LookML is a database table or a logical representation of one. Each view includes dimensions (which are database columns or logical representations of them) and measures (which are aggregate functions on dimensions, such as an COUNT of customers or an SUM of cost).
LookML structures

In the below video, you will learn the fundamentals of LookML

Video Link: https://www.youtube.com/watch?v=aPhLU6LSjjA

Steps:

Task 1. Create a view
Task 2. Join a view to an existing explore

Done !!!

If you want to know more you can refer to the below docs,

Thank you :)

--

--

Komal Agrawal

Test Engineer @HCLTech, GCP DevOps Certified, Reader & Writer