I am working to set hook to load into DB. Set-up for dbt_project.yml
file
on-run-end:
- "{{ data_quality_log(results) }}"
Following is the header of my data_quality_log.sql
file
{% macro data_quality_log(results) %}
{%- if execute -%}
{%- set parsed_results = data_quality_parse(results) -%}
{%- if parsed_results | length > 0 -%}
{% set insert_dbt_results_query -%}
.......
Upon running the dbt test
I received following error:
on-run-end failed, error:
'data_quality_log' is undefined
Any ideas on how to solve?