This page refers to the
drill_fieldsparameter that is part of a view .
drill_fieldscan also be used as part of a dimension or measure , described on thedrill_fields(for fields) parameter documentation page.
Usage
view: view_name { drill_fields : [ field_or_set , field_or_set , … ] }
Definition
The drill_fields
parameter controls what happens when a user clicks on the value of a table cell while exploring data. When a user does this, they "drill" into the data, allowing them to see the individual records that make up that cell, limit their query to the cell's value, or slice the data in a related way.
The drill_fields
parameter accepts a list of fields, sets
, or a combination of both fields and sets.
At the view level, drill_fields
applies the declared drill fields to all measures in the view that do not have drill_fields
defined at the measure level
.
Drilling can be disabled by including in the query a dimension with the can_filter
parameter set to no
.
Example
Suppose you have the following LookML:
view: orders {
drill_fields: [source*, age]
measure: count {
type: count
}
measure: average_age {
type: average
sql: ${age} ;;
drill_fields: [id, name, city, state]
}
set: source {
fields: [traffic_source, country]
}
}
Drilling into the Average Agefield displays the ID, Name, City, and Statefields. Drilling into the Countfield displays the default Traffic Source, Country, and Agefields.


