-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Labels
Description
Describe the bug
When the on-run-end hook ("{{ dbt_project_evaluator.print_dbt_project_evaluator_issues() }}"
) is enabled with dbt Fusion, I get an error.
The error is an result of that the macro does not actually return SQL, but the hook is triggering an query to the db. So the query is empty.
Steps to reproduce
dbt-fusion 2.0.0-preview.3
Project evaluator version 1.1.2
Bigquery
Expected results
I expect the hook to run without trouble.
Actual results
Screenshots and log output
error: dbt1501: Failed to render SQL invalid operation: AdapterError: ADBC error: [BigQuery] googleapi: Error 400: Syntax error: Unexpected end of statement at [1:1], invalidQuery
(in <RUN_OPERATION>:1:9)
(in dbt_internal_packages/dbt-adapters/macros/etc/statement.sql:14:35)
--> <RUN_OPERATION>:1:9
Finished 'compile' with 1 error and 1 warning in 2s 500ms
System information
packages:
- package: dbt-labs/dbt_utils
version: 1.3.0
- package: dbt-labs/codegen
version: 0.13.1
- package: dbt-labs/dbt_project_evaluator
version: 1.1.2
Which database are you using dbt with?
- postgres
- redshift
- bigquery
- snowflake
- trino/starburst
- other (specify: ____________)
The output of dbt --version
:
dbt-fusion 2.0.0-preview.3
Additional context
Are you interested in contributing the fix?
Happy to, but fix I can think of is adding the following at the bottom, which feels far from elegant.
[...]
{{ print("\n") }}
{%- endif %}
{{ return("select 1") }}
{% endmacro %}