Compilation error: tag name expected

Hello, using dbt on postgres db, I am seeing the below error;

06:50:11  Running with dbt=1.3.1
06:50:12  Unable to do partial parsing because a project config has changed
06:50:14  Encountered an error:
Compilation Error in model vw_connections_call (folder_name/Views/vw_connections_call.sql)
  tag name expected
    line 60
      WHEN c.direction::text = 'Inbound'::text AND "substring"(c.extension_route::text, 1, 3) ~~ '%{%'::text THEN "substring"(c.extension_route::text, 1, 5)

Any suggestions for how I can quote the curly brace and percent signs here to prevent dbt from seemingly thinking something python/jinja related is being invoked with that character?

In case someone else finds this, I worked around the error by changing the syntax of the quoted SQL. Referenced the position function instead of ~~ '%{%'. dbt doesn’t seem to want to parse a curly brace followed by the similarity operator (%) as SQL.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.