When I follow the trivial example from the dbt-utils website: https://docs.getdbt.com/reference/dbt-jinja-functions/run_query
-- models/foo.sql
{% if execute %}
{% set results = run_query('select 1 as id') %}
{% do results.print_table() %}
{% endif %}
I get the syntax error:
Database Error in model testcard_id_audit (models/audit/foo.sql)
syntax error at or near ")"
LINE 13: );
I actually get this with every query I try to run.
dbt version:
dbt --version
Core:
- installed: 1.7.10
- latest: 1.7.10 - Up to date!
Plugins:
- postgres: 1.7.10 - Up to date!
dbt-utils:
- package: dbt-labs/dbt_utils
version: 0.9.6