Using HTML and Liquid with Looker

(Zachary Michel) #1

What is Liquid?

Liquid formatting is an open source Ruby-based template language built by Shopify (Liquid Documentation). Looker utilizes Liquid to reference values from measures and dimensions within the html parameter.

Examples in this post will be using the HTML documentation with available parameters, as well as the URL query parameters.

Common Patterns:

Note: {{ value }} in these patterns is substitutable for any other appropriate value parameter. The value type parameters are found in the HTML documentation.

Additional Topics on Liquid

Multiple values per cell
Displaying values from other fields in the tooltip
[Analytic Block] Peer Comparison: Compare Against Rest of Population
Creating a week dimension that displays the last day of the week
Using HTML and Liquid to create 'progress' bars inside a Table Vis
Looker 3.22 Release Notes
(Brett Sauve) #2

Please note that the template parameter is deprecated as of 3.30. As of 3.30, all Looker models just assume liquid templating, so you don’t have to explicitly state it in your model.