# Liquid Filters Documentation

**URL:** <https://discuss.google.dev/t/liquid-filters-documentation/113973>\
**Category:** Looker\
**Tags:** lookml, filter\
**Created:** [November 4, 2021, 2:50pm UTC](https://discuss.google.dev/t/liquid-filters-documentation/113973 "2021-11-04T14:50:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![minerkt](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/minerkt/32/212_2.png) [@minerkt](https://discuss.google.dev/u/minerkt)\
**Post date:** [November 4, 2021, 2:50pm UTC](https://discuss.google.dev/t/liquid-filters-documentation/113973/1 "2021-11-04T14:50:48Z")

</div>

I stumbled across this reference at the bottom of the [liquid variables reference page](https://docs.looker.com/reference/liquid-variables) for handling filters as a liquid variable.

```auto
{{ _filters['view_name.field_name'] | split:"," | sql_quote | join:"," }}

```

That end portion with the “split” and “join” functions, I decided to try something with a “remove” function that ended up working.

For example, if the “view\_name.field\_name” in the filter was “Mississippi” and I used the following liquid filter, we would get the following returned.

```auto
{{ _filters['view_name.field_name'] | remove:"i"}}

returns: "Msssspp"

```

Another use case would be stripping the “%” from a “contains” filter to just get the value elsewhere.

Is there any documentation that discusses the different operators/functions like “split”, “join”, “remove” and how to best use them?

---

<div class="post-metadata">

**Author:** ![leobardor](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/leobardor/32/70871_2.png) [@leobardor](https://discuss.google.dev/u/leobardor)\
**Post date:** [November 8, 2021, 4:39pm UTC](https://discuss.google.dev/t/liquid-filters-documentation/113973/2 "2021-11-08T16:39:40Z")

</div>

Hi Minerkt,

You can find more information and examples about liquid template engine here:

- Split:

[Liquid reference - split](https://shopify.github.io/liquid/filters/split/)

- Join:

[Liquid reference - join](https://shopify.github.io/liquid/filters/join/)

​​​​​​​ - Remove:

[Liquid reference - remove](https://shopify.github.io/liquid/filters/remove/)

- Full documentation:

[Liquid reference - Shopify](https://shopify.github.io/liquid/)

Happy debugging!

Leo

---

<div class="post-metadata">

**Author:** ![rkancha2024](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@rkancha2024](https://discuss.google.dev/u/rkancha2024)\
**Post date:** [July 24, 2024, 2:40pm UTC](https://discuss.google.dev/t/liquid-filters-documentation/113973/3 "2024-07-24T14:40:45Z")

</div>

Can we use lower or upper function around liquid variables? I am getting error..  
{%- if **lower** (user\_email\_domain\*\*)\*\* == ‘[yahoo.com](http://yahoo.com)’ -%}

how to overcome this issue? please help.

---

<div class="post-metadata">

**Author:** ![Pieter\_DeVries](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/pieter_devries/32/10037_2.png) [@Pieter\_DeVries](https://discuss.google.dev/u/Pieter_DeVries)\
**Post date:** [July 31, 2024, 5:05am UTC](https://discuss.google.dev/t/liquid-filters-documentation/113973/4 "2024-07-31T05:05:21Z")

</div>

Hi @rkancha2024 , you can’t use sql type functions such as lower() within liquid.

However, you can use what are called [liquid filters](https://shopify.dev/docs/api/liquid/tags) to achieve a similar result.  
In this case, we would need to make user\_email\_domain.\_value into lowercase.

The syntax could look like {% if user\_email\_domain.\_value | lowercase == ‘[yahoo.com](http://yahoo.com)’ %}  
However, from my testing, it seems like adding filter statements into a conditional doesn’t work as I would like, so we should take this approach instead.

1. Assign the lowercase value to a liquid variable: {% assign user\_email\_domain = user\_email\_domain.\_value | downcase %}
2. Evaluate the liquid variable to your string: {% if user\_email\_domain == ‘[yahoo.com](http://yahoo.com)’ %}

Please note though, that gettings field values such as \_value can only be used in action/html/link parameters as according to the [docs](https://cloud.google.com/looker/docs/liquid-variable-reference#liquid_variable_definitions).

If you want to evaluate in sql you would just use standard CASE WHEN lower(user\_email\_domain) = ‘[yahoo.com](http://yahoo.com)’ THEN xxx ELSE END kind of syntax.
