View the original community article here
Author: Won Park
The Help Center article More Powerful Data Drilling provides a detailed overview of how to create custom drills using liquid variables. The Visual Drilling section outlines how to provide users with a visual drilling experience (other than the default data table) by using Looker’s visualization settings in a URL.
This article provides supplemental instructions for how to obtain those visualization settings and apply them to a drill field in LookML.
- Enable the Visual Drilling labs feature.
- Enter development mode and navigate to the project and LookML file containing the field to which you’d like to add the visual drill. Add the
drill_fields
parameter within the definition of the field, and specify the fields to be included in the drill visualization. - Go to an Explore containing the field and drill into it. You will see a default visualization in the drill modal.
- Click Explore from Here from the drill modal.
- In the Explore that you are redirected to, modify the default drill visualization as needed to create the desired visualization. For example, choose a different type of chart, change the colors, add grid lines, etc.
- Once you have the visualization you want, click the Explore’s gear icon, select Share, and copy the Expanded URL.
- Paste the Expanded URL into a URL decoder (such as MeyerWeb) and “decode.”
- Copy the decoded URL, paste it into a JSON string escaper (such as FreeFormatter), and “Escape.”
-
Copy the part of the escaped output after
`&vis={`
and before`}&filter_config=`
- Go back to the LookML project with the drill field definition, add the following, replacing
"[this is where you enter the vis config details]"
: with the escaped string from step 9:link: {
label: "Show as line plot" #or your label of choice
url: "
{% assign vis_config = '{
[this is where you enter the vis config details]
}' %}
{{ link }}&vis_config={{ vis_config | encode_uri }}&toggle=dat,pik,vis&limit=5000"
} - Save, validate your LookML, and push your changes to production when you are ready!