How to get visualization configurations for custom drilling

  • 17 February 2021
  • 9 replies

Userlevel 1

Author: Won Park @wonkyoung.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.

  1. Enable the Visual Drilling labs feature.
  2. 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.
  3. Go to an Explore containing the field and drill into it. You will see a default visualization in the drill modal.
  4. Click Explore from Here from the drill modal.
  5. 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.
  6. Once you have the visualization you want, click the Explore’s gear icon, select Share, and copy the Expanded URL.
  7. Paste the Expanded URL into a URL decoder (such as MeyerWeb) and “decode.”
  8. Copy the decoded URL, paste it into a JSON string escaper (such as FreeFormatter), and “Escape.”
  9. Copy the part of the escaped output after `&vis={` and before `}&filter_config=`

  10. 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"
  11.  Save, validate your LookML, and push your changes to production when you are ready!


9 replies

Hello @lauren.boltz 


First of all thanks for this post, this is becoming really helpful for me at the moment. However I do have some questions that perhaps you can help me with?


While following your instructions, I have now come up with the escaped string mentioned in step 9.

On step 10 you mention that I would have to replace a piece of text between brackets with the escaped string but (and forgive me, I'm quite new to looker) I didn't fully catch if I should keep the VIS keyword while copying the escaped string, I also don't know if I should keep the brackets or remove them when replacing that piece of text.

The reason for those two questions is that I am coming up with a very long escaped string and when I paste it, suddenly I end up with a long gray line while at first the text was orange so I think I’m doing something wrong or my string is just simply too long or something.


Can you help me with this !?

Userlevel 1

Hi @Beto ! Thank you so much for the comment!

We would not want to keep the [ ] around the vis config details. It should look like this:

{% assign vis_config = '{ vis config details }' %}

Also, can you confirm what you mean when you say “keep the VIS keyword while copying the escaped string”? 

Thanks again!

Thanks for your reply. 

What I mean with the VIS keyword is this 


that sentence is on the string on step 10 , when going to LookML do I want to keep that sentence along with the config details, or just the config details.

Thank you for the help.

Userlevel 1

Hi @Beto thank you for clarifying!!  For step 10, you can replace the 

this is where you enter the vis config details with the vis config. The text this is where you enter the vis config details  only demonstrates where to place the vis config details.

I hope that helps - please let me know if you have any other questions!

Userlevel 1

@lauren.boltz  Tried doing the same thing and i get a 404 error

Below is how my lookml looks like , can you let me know what i am doing wrong here?

link: {
      label: "Show as bar graph"
      url: "
      {% assign vis_config = '{\"x_axis_gridlines\":false,\"y_axis_gridlines\":true,\"show_view_names\":false,\"show_y_axis_labels\":true,\"show_y_axis_ticks\":true,\"y_axis_tick_density\":\"default\",\"y_axis_tick_density_custom\":5,\"show_x_axis_label\":true,\"show_x_axis_ticks\":true,\"y_axis_scale_mode\":\"linear\",\"x_axis_reversed\":false,\"y_axis_reversed\":false,\"plot_size_by_field\":false,\"trellis\":\"\",\"stacking\":\"\",\"limit_displayed_rows\":false,\"legend_position\":\"center\",\"point_style\":\"none\",\"show_value_labels\":false,\"label_density\":25,\"x_axis_scale\":\"auto\",\"y_axis_combined\":true,\"ordering\":\"none\",\"show_null_labels\":false,\"show_totals_labels\":false,\"show_silhouette\":false,\"totals_color\":\"#808080\",\"type\":\"looker_column\",\"defaults_version\":1,\"hidden_fields\":[\"psl.sum_mkt_val\",\"Date.TodaysDate_date\"]}' %}
     {{link}}={{ vis_config | encode_uri}}&toggle=dat,pik,vis&limit=5000 "


This is how when i use the drill down and link fields the url is being passed



Userlevel 1

Hi @sri75 !! Thanks for the comment! I’m going to cc @wonkyoung.park, the content creator for this post to see if we can figure this out!

Userlevel 1

Hi @sri75 !! Thanks for the comment! I’m going to cc @wonkyoung.park, the content creator for this post to see if we can figure this out!

Hey Lauren, I figured it out. Looks like the custom drilling works only with measures and not dimensions. 

Userlevel 1

@lauren.boltz  @wonkyoung.park, One thing i did oberve here is that when i make a pivot on the second chart for some reason it just doesnt work. I tried multiple charts like bar/column/multiple pie but none of them bring me back the results. If i hit explore from here from the pop up i can still see my chart . 

Below is a sample of my code:

link: {
      label: "Column Chart"
      url: "
      {% assign vis_config ='{ \"x_axis_gridlines\":false,
\"defaults_version\":1 '} %}
{{link}}&vis_config={{ vis_config | encode_uri}}&pivots=SecurityClassifications.barl4_indust_name&toggle=dat,pik,vis&limit=5000&column_limit=15"

@sri75 Awesome. Thanks Sri. As you said, for pivoting when appended the pivot dimension, then it worked. Thanks alot