Love Liquid
Looker uses the Liquid templating language, developed by Shopify: https://shopify.github.io/liquid/
It allows you to make various parts of your LookML dynamic, by writing expressions and referencing a number of Looker-specific contextual variables: https://docs.looker.com/reference/liquid-variables
Lots of LookML parameters allow Liquid, and one the most common is with derived tables' sql:
blocks. But there are a lot of other clever (and sometimes fiddly) uses for Liquid. Here are some of my favourites:
- Making field labels/visualisation legends dynamic based on another field/parameter
- Making fields'
link:
parameter aware of the field's value so users see different links accordingly - Colouring/styling fields dependent on their value
- Filtering data in fields, sql_always_where, or derived table SQL based on user attributes to control PII access