<v0.17.0> added a `TableBlock` (<https://github.co...
# community-support
j
v0.17.0 added a
TableBlock
(https://github.com/elementary-data/elementary/pull/1826). Is it possible to use the new table rendering to display test results as a table rather than a JSON blob? There's been an open issue requesting this functionality since Aug 2023 (https://github.com/elementary-data/elementary/issues/1079). I'm not seeing any documentation around this new component, or indication that is is coupled to the "normal" way of configuring dbt alerts in terms of the "alert_fields".
n
Hey @Jason Gofford! Thanks for bringing this up again. For certain tests, the results are now shown in table format. This information is also stored in the
test_result_rows
table in the Elementary schema, but I understand you’re referring to something that would be included directly in the alert itself. Could you share a bit more about the ideal outcome you’re envisioning? How would you like to see this information presented in the alert?
j
If it looks like the above then that is more than sufficient. I'll double-check.
🙌 1
That's great, and far better than it was! Thanks @Noya Offer. Is it possible to configure the number of rows displayed in the sample? We have two types of "test" with elementary. • One is data integrity for technical users and engineers -- there can be tens of thousands of failures if something goes wrong so obviously we don't want to show all of these in a results sample as the recipient can just query the data for exceptions more broadly. • The other is configuration monitoring for non-technical users. In this case we would like to be able to show an exhaustive list of exceptions as the user has no other way of accessing the data. An example would be Shopify config - e.g., we expect all products with a specific tag to not have shipping. We can test for this within a dbt pipeline, and surface the alert with elementary, but would want the alert to have all exceptions rather than 5 so that the user can take remedial action.
🙌 1
Hey @Noya Offer - any thoughts on if the size of the rests sample can (or could) be configured?
n
Hey Jason! Thank you for sharing the detailed use case. Practically speaking, you can control how many sample rows are saved and displayed in the alert using the
test_sample_row_count
flag. The alert message will also clearly indicate the total number of failing rows, giving users visibility into the overall scale of the issue. For technical users, accessing the full set of failures is straightforward: • They can use the result query shown in the UI (available for all tests except anomaly tests). • Alternatively, dbt’s native store_failures option allows you to persist all failing records. The case of non-technical users is a bit different. Currently in Elementary OSS, we focus on ensuring they’re aware of the issue and how large it is (whether it’s 5 failures or 5,000). We don’t save and display the entire set of failures directly in the alert. Typically, they’d collaborate with technical users if they need access to the full results. That said, this is a really interesting scenario, and it ties into some of the work we’re doing to make data more accessible for business users (feel free to check out the Cloud features built for non-technical users). Happy to hear your thoughts about this 🙂
l
@Noya Offer Thanks for pointing me to the thread!
For certain tests, the results are now shown in table format.
Could you elaborate which tests (or conditions) need to be fulfilled to show the test result samples as table block? 😊
n
Sure! It's presented as a table for all tests but anomaly tests, and when there's 4 or less columns in the sample. Happy to hear any more thoughts about the best way to present it. Also, if you're interested, we'll be happy to read any other thoughts you have in our anomaly detection form 🙂 https://elementary-community.slack.com/archives/C02BPB78J4T/p1744111398184939