Can I use the `value` liquid variable in sql parameters?

Knowledge Drop

Last tested: Jun 22, 2020
 

No. You can check the Usage column in the liquid variable reference in docs to see where each variable can be used.

why not?

The value and field_name._value variables take their values from the results of a query that have been returned from the database. Therefore, these variables can only be used in parameters that can be resolved after the query results have come back, such as the link, html, and action parameters. Since sql parameters determine the SQL for the query Looker generates, they must necessarily be resolved before the query is sent to the database and therefore before the query results come back.

This content is subject to limited support.                

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