# Identify and capture records of failed cases in dbt tests

**URL:** <https://discourse.getdbt.com/t/identify-and-capture-records-of-failed-cases-in-dbt-tests/15532>\
**Category:** Help\
**Tags:** testing\
**Created:** [September 19, 2024, 7:02pm UTC](https://discourse.getdbt.com/t/identify-and-capture-records-of-failed-cases-in-dbt-tests/15532 "2024-09-19T19:02:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pranjalbhatt](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/pranjalbhatt/32/4548_2.png) [@pranjalbhatt](https://discourse.getdbt.com/u/pranjalbhatt)\
**Post date:** [September 19, 2024, 7:02pm UTC](https://discourse.getdbt.com/t/identify-and-capture-records-of-failed-cases-in-dbt-tests/15532/1 "2024-09-19T19:02:17Z")

</div>

I have several data quality tests set up in my pipeline and using `dbt test` to execute them. Currently, using `elementary` and `dbt_expectations` package, I am also able to load the test results onto snowflake tables. All details (node\_id, database, schema, test\_name, severity…) is getting logged as records into the table.

But in order to deep dive into data quality issues, I want to **identify the records that failed test cases**. I currently do not see any package or a macro that can help me visibilty get the rows of failed cases.

Is there an approach that I should follow ?
