dbt-utils
dbt-utils copied to clipboard
run_query macro throws syntax error with each example I try
Describe the bug
run_query
macro produces the same error on every query I try
Database Error in model testcard_id_audit (models/audit/foo.sql)
syntax error at or near ")"
LINE 13: );
^
Even with this trivial example :
{% if execute %}
{% set results = run_query('select 1 as id') %}
{% do results.print_table() %}
{% endif %}
Steps to reproduce
Add this to a model
{% if execute %}
{% set results = run_query('select 1 as id') %}
{% do results.print_table() %}
{% endif %}
and perform dbt run
Expected results
I would expect no error and a table that is returned I can print for example.
Actual results
Database Error in model testcard_id_audit (models/audit/foo.sql)
syntax error at or near ")"
LINE 13: );
Screenshots and log output
System information
The contents of your packages.yml
file:
Which database are you using dbt with?
- [*] postgres
- [ ] redshift
- [ ] bigquery
- [ ] snowflake
- [ ] other (specify: ____________)
The output of dbt --version
:
dbt --version 1 ↵ ✖ ✹ ✚ ✭SF-1280-remove-unused-models
Core:
- installed: 1.7.10
- latest: 1.7.10 - Up to date!
Plugins:
- postgres: 1.7.10 - Up to date!