Creating dimensions in views
When you create your LookML project and choose Generate Model from Database Schema, Looker detects the views (tables
) and the view fields (columns
) automatically. It usually adds three parameters to every column: name (dimension:
), data type (time
, string
, number
, yes/no
, tier
, date
, etc.), and SQL
(by default, it references the table and the name of the column in this table); ${field_name}
references a specific field within a LookML file. Sometimes, Looker adds a primary_key
parameter, if it detects a field that can be potentially a primary key field; it is important for join operations (many to many, many to one, one to many, etc.). By default, Looker creates all the fields (columns) as dimensions (qualitative data) and adds some measures.
Our job is to enrich and complete this data by adding the parameters to our existing dimensions and measures, and by creating new dimensions and measures.
How do we know what is needed? It is something to do before...