LookML cannot parse Liquid

Hi Looker team,


Database Dialect: BigQuery

Context:

We build the SQL-based derived tables.

In the SQL, there are some liquid syntax involved.

For example:

  • {% parameter ghp_trade.CME_open_time %}
  • where {% incrementcondition %} created_at {% endincrementcondition %}

Problem is the LookML compiler seems not able to parse these syntaxes. It caused these expressions still exist in the compiled SQL. Therefore, the BigQuery job failed to build the data for the Persistent Derived Table. (See the screenshot below)
 

296a82b7-75e9-4f0f-95ea-5fe7405fddff.png

My question is: What is wrong with LookML runtime these days? It has been blocking us to release very important reports to our firm.

Appreciate your help.

Solved Solved
0 1 671
1 ACCEPTED SOLUTION

Generally, Looker does not recommend using liquid within PDTs. This is because, unlike when a user executes a query from explore, the pdt regenerator does not accept input for templated filters when generating the query, and therefore cannot correctly parse liquid syntaxes into SQL.

I recommend either removing persistence from the derived table or remove liquid syntax from where clause.

You can read the document for more details - when derived tables use templated filters or Liquid parameters , persistence is not supported for derived tables that use templated filters or Liquid parameters.

View solution in original post

1 REPLY 1

Generally, Looker does not recommend using liquid within PDTs. This is because, unlike when a user executes a query from explore, the pdt regenerator does not accept input for templated filters when generating the query, and therefore cannot correctly parse liquid syntaxes into SQL.

I recommend either removing persistence from the derived table or remove liquid syntax from where clause.

You can read the document for more details - when derived tables use templated filters or Liquid parameters , persistence is not supported for derived tables that use templated filters or Liquid parameters.

Top Labels in this Space
Top Solution Authors