metaplane_utils is a collection of macros that we at Metaplane have written to solve common issues we have run into with dbt.
We currently support git based installation:
packages:
- git: https://github.com/metaplane/dbt-utils.gitpublish_test_failures: This macro can be used to automatically ingest the result of test failures captured by dbt via store_failures.
Ingestion will only happen if you manually opt a test in like so:
- accepted_values:
meta:
metaplane:
publish_failures: true
values:
- returned
- completedThe macro should be called in an on-end-run hook in the dbt_project.yml file like:
on-run-end:
- "{{ metaplane_utils.publish_test_failures() }}"Metaplane will then upload the failed test results into a snowflake stage, generate a pre-signed URL for that stage, and write the URL into the run_results.json file on the adapter response of each run tests.
This macro is currently on supported for Snowflake.