Associate Data Practitioner free question 6 / 10 · Domain 2: Data Analysis and Presentation
In LookML, you want to define region, a region name, as a field used for filtering and grouping. Which basic field type do you use?
- Define it as a dimension
- Define it as a datagroup
- Define it as a measure
- Define it as an access_grant
Show the answer and explanation
Answer: A
Why this is correct
The "Definition" section of the LookML dimension reference says: "The dimension parameter declares a new dimension and specifies a name for that dimension." A region name is a field that holds an attribute value, so a dimension, which is used to classify and filter by region, is the right choice.
Why the other options are wrong
"Define it as a measure" … A measure represents an aggregated value, which differs from the basic definition used to make a region name a classification field.
"Define it as an access_grant" … An access_grant is a mechanism that expresses a condition for allowing access. It does not define the region values that serve as the angle of an aggregation.
"Define it as a datagroup" … A datagroup is a definition related to caching and refresh management. It is not an analysis field such as a region name.
Key point
First separate the roles: a dimension is an attribute used to classify and filter, and a measure is a value that gets aggregated. Referencing the underlying SQL column and giving the field a display name are separate settings.