GA Runtime Case When Error

Hello! I’m currently having some trouble when switching to the new GA Runtime. 

Line of code in question (runs in a derived table):

CASE WHEN ‘{{dimension_name._sql | escape}}’ LIKE ‘%no filter on %’ THEN insert_action_here
ELSE {% condition filter_name %} COLUMN_IN_TABLE {% endcondition %}
END


which Looker translates to:

CASE WHEN ‘(view_name.dimension_name = ‘string_in_question’)’ LIKE ‘%no filter on%’ THEN insert_action_here
ELSE (COLUMN_IN_TABLE = ‘filter_name_value’)
END


This didn’t give any errors prior to using the new runtime and functioned as expected for what ._sql generates.

The error that occurs:

SQL Syntax Error: SQL compilation error: syntax error line 83 at position 53 unexpected 'string_in_question'. syntax error line 83 at position 95 unexpected 'then'. syntax error line 84 at position 10 unexpected 'ELSE'. syntax error line 84 at position 16 unexpected 'COLUMN_IN_TABLE'. syntax error line 85 at position 8 unexpected 'END'.


I suspect that the error may come from this code not following the more strict liquid validations the new runtime executes. 

Any help would be appreciated, and I thank you for taking a look! I hope everyone has a great week.

0 0 46
0 REPLIES 0
Top Labels in this Space
Top Solution Authors