Liquid version of a "case when"

Knowledge Drop

Last tested: Mar 30, 2020
 

If you want to implement a liquid {% if %} version of a case when statement?

You can do that in the html parameter like this -

 

dimension: item_name {

type: string

sql: ${TABLE}.item_name ;;

html: {% if value == "Sarah" %}

Sarah_2

{% else %}

{{ value }}

{% endif %} ;;

}

This content is subject to limited support.                

Version history
Last update:
‎07-07-2021 01:12 PM
Updated by: