<@U088WCP3B4P> For the OSS I would like to sent a ...
# ask-elementary-ai
m
@kapa.ai For the OSS I would like to sent a sample of the test that failed. Is that possible if yes how
k
A message from kapa.ai
Yes, in Elementary OSS, it is possible to send a sample of the rows that caused a test to fail. By default, Elementary stores a sample of up to 5 failed rows per test in the table test_result_rows (or test_results_samples), and this sample is used in reports and alerts to help with triage. You can configure the number of sample rows by setting the test_sample_row_count variable in your dbt project. For example:
Copy code
yaml vars:   elementary:     test_sample_row_count: 10  # Number of sample rows to store per failed test
This sample can be included in Slack alerts by configuring the alert_fields property in your model or test meta, for example:
Copy code
yaml models:   - name: my_model_name     meta:       alert_fields: ["test_results_sample", "description", "owners"]
Currently, sending a sample in email or S3-based alerts is not natively supported, but it works for Slack alerts. The sample rows are always available in your data warehouse in the test_result_rows table, and you can query them directly if you want to include them in custom notifications or reports. If you want to disable this feature, set test_sample_row_count: 0. For more details, see the documentation on [alerts configuration](https://docs.elementary-data.com/oss/guides/alerts/alerts-configuration#alerts-distribution) and [test result samples](https://docs.elementary-data.com/dbt/package-models#run-results) as well as the FAQ on [sample row configuration](https://docs.elementary-data.com/oss/general/faq#can-i-see-more-result-samples-in-the-report).