Knowledge Drop

Error parsing liquid: Liquid parse exception: parser error "extraneous input '{{' expecting....


Userlevel 5

Last tested: Jun 15, 2020
 

In Looker 7.10 old Liquid syntax is throwing this error:

LookML Warnings (1)Error parsing liquid: Liquid parse exception: parser error "extraneous input '{{' expecting {Str, '(', '[', DoubleNum, LongNum, 'capture', 'endcapture', 'comment', 'endcomment', RawStart, 'if', 'elsif', 'endif', 'unless', 'endunless', 'else', 'contains', 'case', 'endcase', 'when', 'cycle', 'for', 'endfor', 'in', 'and', 'or', 'tablerow', 'endtablerow', 'assign', 'true', 'false', Nil, 'include', 'with', 'empty', 'blank', EndId, Id, RawEnd}" on line 1, index 32orders.view:25 (the_look22:orders)

 

Look for a dimension with syntax like:

dimension: status {

type: string

sql: ${TABLE}.status ;;

html:

{% assign label_data = {{value}} %}

{{label_data}}

;;

}

 

The warning is coming from the {{value}} in the {% .... %} and you can fix this by removing the double parentheses like:

dimension: status {

type: string

sql: ${TABLE}.status ;;

html:

{% assign label_data = value %}

{{label_data}}

;;

}

 

This may also show up for previous liquid syntax that is incorrect but wasn't showing as an error before. For example, prior to the update this syntax passed in the lookml validator with no errors or warnings :

group_label: " {{ ._view._name }} "

And now after the update, it shows : "Error parsing liquid: Liquid parse exception: parser error "extraneous input '.' expecting (etc.)". So you will want to change that to group_label: " {{ _view._name }} "

 

This content is subject to limited support.                

 

 


0 replies

Be the first to reply!

Reply