📊LookML
Also known as Looker Modeling Language, LookML Model
The code that tells Looker what tables, fields and numbers mean.
Think of it like
It is like a label on each jar in the kitchen. Once the jars have labels, anyone can cook.
Example
Why it matters
SQL is often spread across many reports. LookML turns it into one set of rules that people check.
Definition
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 ;;
}
}Common mistake
Key takeaways
- 1Views. One per table, with its fields.
- 2Dimensions and measures. Group by one, add up the other.
- 3Kept in Git. Reviewed like any other code.