The problem I’m having
Create a table using SQL to capture credits used on each unique test run as well as other pertinent information — warehouse, etc. Similar to using a post hook on “models” in dbt_project.yml then being able to parse information on each test of each model.
The context of why I’m trying to do this
I’ve tried run_results.json but this is not returning enough information relative to what a post hook on a model run returns.
What I’ve already tried
See above, for loop on run_results node structure has worked but is slow and is not returning the information I need. Inserted a macro on on-run-end to be able to access run results
Some example code or error messages
For models, in dbt_project.yml, e.g.:
models:
base:
post_hook: "{{ example_macro( ) }}"
Is this same functionality supported for tests? It wasn’t working initially for me:
tests:
base:
post_hook: "{{ example_macro( ) }}"