Templated filter causing a - Syntax error: Unexpected '{' - in compiled SQL

KatieH
New Member

I’m trying to use templated filtering in a View and it keeps throwing a syntax error when I try to use an Explore built from this view.

Looking at the compiled SQL, the special { character is not being recognized by the compiler, so it’s throwing a syntax error.

I’ve used the exact same logic in other Views, so I’m not too sure what I’m doing wrong here 🤔

Here’s the top of the code block for the view:

view: client_analytics_sessions_events_funnel {
  derived_table: {
    sql:
    WITH get_event_rank AS (
      SELECT
      session_id,
      MIN(client_event_name) AS client_event_name,
      MIN(event_rank_in_session) AS event_rank_in_session,
      MIN(action_event_rank_in_session) AS action_event_rank_in_session,
      MIN(screen_event_rank_in_session) AS screen_event_rank_in_session

      FROM `monzo-analytics.prod.client_analytics_sessions_events`

      WHERE {% condition funnel_start_client_event_name %} client_event_name {% endcondition %}
      AND {% condition timeframe %} client_event_ts {% endcondition %}

      GROUP BY 1
    ),

Here’s the error that’s getting thrown when I try to build an Explore from this view:

Not too sure what’s going on here…any ideas welcome!

0 2 696
2 REPLIES 2
Top Labels in this Space