Hi! I’m curious about how you calculate the 'Table...
# ask-elementary-ai
f
Hi! I’m curious about how you calculate the 'Tables Health' metric — specifically, how it’s determined based on the status of test results. Could you clarify which tables are used for this and how the metric is calculated?
k
A message from kapa.ai
The Tables Health metric in Elementary Data is calculated based on test results stored in several tables in your data warehouse. Here's how it works: The data health score is calculated using the following methodology: - Each test (both dbt and Elementary tests) is mapped to one of the six data quality dimensions - Tests are scored based on their status: - Passing tests: 100 points - Warning status tests: 50 points - Failing tests: 0 points - These scores are then aggregated to provide a health score for each quality dimension - The total health score is a weighted average of the six dimensions (with configurable weights) The primary tables used for this calculation are: 1.
elementary_test_results
- Contains all test results including passed and failed ones for all project tests including anomaly tests 2.
dbt_tests
- Contains definitions of all tests in your dbt project 3.
dbt_models
- Contains information about your models For the "Monitored tables" visualization specifically, Elementary considers a table to be monitored if its model has at least one test, using data from the
dbt_tests
and
dbt_models
tables [Slack forum answer](https://slack.com/archives/C02CTC89LAX/p1692272312227569). The Tables Health chart shows the health status distribution (healthy, warning, error) of your tables based on test results. When tests fail or are in warning status, they affect the health score of the associated tables according to the scoring system mentioned above. This health scoring system is part of Elementary's Data Health Dashboard, which presents data health in a simple way using color coding to indicate if scores are healthy, with configurable thresholds for the color coding [Data Health Dashboard](https://docs.elementary-data.com/features/collaboration-and-communication/data-health). Note that the health calculation is based on current test results and models. If you remove models from your project, this will affect how coverage and health are calculated going forward, as the system primarily works with the current state of your data assets.