/lʊk-ɛm-ɛl/
n. “The language that teaches Looker how to see your data.”
LookML is a modeling language used in Looker to define relationships, metrics, and data transformations within a data warehouse. It allows analysts and developers to create reusable, structured definitions of datasets so that business users can explore data safely and consistently without writing raw SQL queries.
Unlike traditional SQL, LookML is declarative rather than procedural. You describe the structure and relationships of your data — tables, joins, dimensions, measures, and derived fields — and Looker generates the necessary queries behind the scenes. This separation ensures consistency, reduces duplication, and enforces business logic centrally.
Key concepts in LookML include:
- Views: Define a single table or dataset and its fields (dimensions and measures).
- Explores: Configure how users navigate and join data from multiple views.
- Dimensions: Attributes or columns users can query, such as “customer_name” or “order_date.”
- Measures: Aggregations like COUNT, SUM, or AVG, defined once and reused throughout analyses.
Here’s a simple LookML snippet defining a view with a measure and a dimension:
view: users {
sql_table_name: public.users ;;
dimension: username {
sql: ${TABLE}.username ;;
}
measure: total_users {
type: count
sql: ${TABLE}.id ;;
}
}In this example, the view users represents the database table public.users. It defines a dimension called username and a measure called total_users, which counts the number of user records. Analysts can now explore and visualize these fields without writing SQL manually.
LookML promotes centralized governance, reducing errors and inconsistencies in reporting. By abstracting SQL into reusable models, organizations can ensure that all users are working with the same definitions of metrics and dimensions, which is critical for reliable business intelligence.
In essence, LookML is a bridge between raw data and meaningful insights — it teaches Looker how to understand, organize, and present data so teams can focus on analysis rather than query mechanics.