# LookML

> The code that tells Looker what tables, fields and numbers mean.

**Field:** Data Engineering  
**Category:** Analytics & BI  
**Also known as:** Looker Modeling Language, LookML Model

## Think of it like

It is like a label on each jar in the kitchen. Once the jars have labels, anyone can cook.

## Definition

LookML is the language used to describe data in Looker. A view file maps to a table. It lists its dimensions, the fields you group by, and its measures, the numbers you add up. An explore says which views can be joined together. Looker reads these files and writes the SQL for each question. LookML files live in Git, so changes can be reviewed.

## Example

Emma adds a refunds measure to the orders view. Once it is checked, every Looker user can put refunds on a chart.

## Example code

```lookml
view: orders {
  sql_table_name: analytics.orders ;;
  dimension: status {
    type: string
    sql: ${TABLE}.status ;;
  }
  measure: total_revenue {
    type: sum
    sql: ${TABLE}.amount ;;
  }
}
```

One view: a field to group by, and a number to add up. Looker writes the SQL from this.

## Why it matters

SQL is often spread across many reports. LookML turns it into one set of rules that people check.

## Common mistake

Writing one huge view with hundreds of fields. Users get lost. Keep views small and named the way people talk.

## Three principles

- **Views.** One per table, with its fields.
- **Dimensions and measures.** Group by one, add up the other.
- **Kept in Git.** Reviewed like any other code.

## Related terms

- [Looker](https://learn.benibix.com/term/data/looker)
- [Semantic Layer](https://learn.benibix.com/term/data/semantic-layer)
- [Measure (Analytics)](https://learn.benibix.com/term/data/measure)
- [Git](https://learn.benibix.com/term/development/git)

![Warehouse tables on the left feed a semantic layer in the middle, which holds one definition of revenue as the sum of amount, plus dimensions for country and month. Three tools on the right, a dashboard, a spreadsheet and an AI assistant, all ask for revenue and all get the same number.](https://learn.benibix.com/diagrams/semantic-layer.svg)

---

Source: https://learn.benibix.com/term/data/lookml
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
